d20ab5a348
Use proper layouts and get rid of multiple annoyances/bugs like text-wrapping randomly happening in the middle of words, background rectangles being too large, a certain binding loop, etc
30 lines
599 B
QML
30 lines
599 B
QML
import QtQuick.Controls 2.12
|
|
import QtQuick 2.12
|
|
|
|
|
|
Repeater {
|
|
id: repeater
|
|
|
|
readonly property int childrenImplicitWidth: {
|
|
let total = 0
|
|
|
|
for (let i = 0; i < repeater.count; i++) {
|
|
let item = repeater.itemAt(i)
|
|
if (item && item.width) total += item.width
|
|
}
|
|
|
|
return total
|
|
}
|
|
|
|
readonly property int childrenWidth: {
|
|
let total = 0
|
|
|
|
for (let i = 0; i < repeater.count; i++) {
|
|
let item = repeater.itemAt(i)
|
|
if (item && item.width) total += item.width
|
|
}
|
|
|
|
return total
|
|
}
|
|
}
|