Fix combobox switching in qml

master
Jos van den Oever 2017-08-21 00:48:06 +02:00
parent b5f649436c
commit a6f34bb1da
2 changed files with 4 additions and 4 deletions

View File

@ -27,8 +27,8 @@ ApplicationWindow {
model: styles
textRole: "display"
onCurrentIndexChanged: {
if (currentText && currentText != "QtQuick Controls 2") {
widgets.currentText = currentText;
if (currentIndex != qtquickIndex) {
widgets.currentIndex = currentIndex;
application.close();
}
}

View File

@ -23,8 +23,8 @@ ApplicationWindow {
model: styles
textRole: "display"
onCurrentIndexChanged: {
if (currentText && currentText != "QtQuick") {
widgets.currentText = currentText;
if (currentIndex != qtquickIndex) {
widgets.currentIndex = currentIndex;
application.close();
}
}