summaryrefslogtreecommitdiff
path: root/examples/quick/controls
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-06-05 21:45:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 16:35:08 +0200
commit1f8ee02fbc06f822ee131fdd395c8e8cd244601d (patch)
tree8846593196d96701741a5a5fba046d13e851ca43 /examples/quick/controls
parent7adeff65148a3967af7b2ec44764a2c275dcd3fe (diff)
downloadqtquickcontrols-1f8ee02fbc06f822ee131fdd395c8e8cd244601d.tar.gz
ComboBox: Make popup scrollable
We factor out part the menu item container logic from Menu into ColumnMenuContent, which takes care of scrolling and mouse hovering, and selection. This makes possible to extend the menu items layout. The pop-over and pull-down look is specified by the menu style component by overriding the ScrollView style. The popup's maximum height is also specified by the menu style. The gallery example can finally use a font families combo box. Task-number: QTBUG-31568 Change-Id: I34a7278f476471c0eb51ef51dde3dd83e13002fe Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'examples/quick/controls')
-rw-r--r--examples/quick/controls/gallery/content/Controls.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/quick/controls/gallery/content/Controls.qml b/examples/quick/controls/gallery/content/Controls.qml
index 98945675..7f6ea9aa 100644
--- a/examples/quick/controls/gallery/content/Controls.qml
+++ b/examples/quick/controls/gallery/content/Controls.qml
@@ -87,6 +87,11 @@ Item {
currentIndex: 2
}
ComboBox {
+ model: Qt.fontFamilies()
+ width: parent.width
+ currentIndex: 47
+ }
+ ComboBox {
id: editableCombo
editable: true
model: choices