rust-qt-binding-generator/demo/qml/StyleSwitcher.qml

24 lines
535 B
QML
Raw Normal View History

2017-09-02 04:14:20 -07:00
import QtQuick 2.6
import QtQuick.Controls 1.5
import QtQuick.Layouts 1.3
RowLayout {
Image {
sourceSize.height: 2* box.height
fillMode: Image.PreserveAspectFit
2017-09-03 05:08:41 -07:00
source: "../rust_qt_binding_generator.svg"
2017-09-02 04:14:20 -07:00
}
ComboBox {
id: box
currentIndex: qtquickIndex
model: styles
textRole: "display"
onActivated: {
if (index !== qtquickIndex) {
widgets.currentIndex = index;
2017-09-02 04:14:20 -07:00
application.close();
}
}
}
}