2015-08-05 07:37:12 |
Didier Roche-Tolomelli |
description |
If a flickable only contains OptionSelector(s), the childrenRect isn't refreshed, and so, the options when expanding aren't shown.
For instance:
import Ubuntu.Components 1.2
MainView {
id: mainview
objectName: "mainView"
applicationName: "foo.bar"
width: units.gu(40)
height: units.gu(75)
Page {
title: "Settings"
Flickable {
id: flick
anchors.fill: parent
contentHeight: column.height
Column {
id: column
width: flick.width
OptionSelector {
text: i18n.tr("Label")
model: [i18n.tr("Value 1"),
i18n.tr("Value 2"),
i18n.tr("Value 3"),
i18n.tr("Value 4")]
}
}
}
}
}
A workaround is to set a Label after the OptionSelector with an empty space as a text:
Label {
text: " "
} |
If a flickable only contains OptionSelector(s), the childrenRect isn't refreshed, and so, the options when expanding aren't shown.
For instance:
import QtQuick 2.4
import Ubuntu.Components 1.2
MainView {
id: mainview
objectName: "mainView"
applicationName: "foo.bar"
width: units.gu(40)
height: units.gu(75)
Page {
title: "Settings"
Flickable {
id: flick
anchors.fill: parent
contentHeight: column.height
Column {
id: column
width: flick.width
OptionSelector {
text: i18n.tr("Label")
model: [i18n.tr("Value 1"),
i18n.tr("Value 2"),
i18n.tr("Value 3"),
i18n.tr("Value 4")]
}
}
}
}
}
A workaround is to set a Label after the OptionSelector with an empty space as a text:
Label {
text: " "
} |
|