From 0a143b6bad631803ae56b16cd967f524246d47ed Mon Sep 17 00:00:00 2001 From: Jos van den Oever Date: Sat, 2 Sep 2017 15:44:35 +0200 Subject: [PATCH] Layout fixes for QQC2 --- demo/qml/StyleSwitcher2.qml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 demo/qml/StyleSwitcher2.qml diff --git a/demo/qml/StyleSwitcher2.qml b/demo/qml/StyleSwitcher2.qml new file mode 100644 index 0000000..36d7c80 --- /dev/null +++ b/demo/qml/StyleSwitcher2.qml @@ -0,0 +1,24 @@ +import QtQuick 2.6 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.3 + +RowLayout { + Image { + sourceSize.height: 2 * box.height + fillMode: Image.PreserveAspectFit + source: "../logo.svg" + } + ComboBox { + id: box + Layout.fillWidth: true + currentIndex: qtquickIndex + model: styles + textRole: "display" + onActivated: { + if (index !== qtquickIndex) { + widgets.currentIndex = index + application.close() + } + } + } +}