[desc][qt] use QVariantList for list-type properties

* required for PySide2 > 5.11.1 (and compatible with 5.11.1)
* AttributeItemDelegate: test for list length to determine whether to create a slider component (if range is set to None on Python side, it will be an empty list on the QML/JS side)
This commit is contained in:
Yann Lanthony 2019-01-02 14:38:28 +01:00
parent e7b49f31c7
commit 6ac4a9d712
5 changed files with 10 additions and 7 deletions

View file

@ -247,7 +247,7 @@ RowLayout {
Loader {
id: slider
Layout.fillWidth: true
active: attribute.desc.range != undefined
active: attribute.desc.range.length === 3
sourceComponent: Slider {
readonly property int stepDecimalCount: stepSize < 1 ? String(stepSize).split(".").pop().length : 0
readonly property real formattedValue: value.toFixed(stepDecimalCount)