flatstyle.qml Example File
flatstyle/flatstyle.qml
import QtQuick 2.8
import QtQuick.Controls 2.1
import Qt.labs.platform 1.0
import Theme 1.0
ApplicationWindow {
id: window
visible: true
minimumWidth: 360
height: 480
title: qsTr("Flat Style")
MainForm {
id: form
anchors.fill: parent
button.onClicked: colorDialog.open()
sizeSwitch.onCheckedChanged: Theme.baseSize = (sizeSwitch.checked ? Theme.largeSize : Theme.smallSize)
checkBoxBold.onCheckedChanged: Theme.font.bold = checkBoxBold.checked
checkBoxUnderline.onCheckedChanged: Theme.font.underline = checkBoxUnderline.checked
slider.onPositionChanged: Theme.font.pixelSize = slider.valueAt(slider.position)
}
ColorDialog {
id: colorDialog
onCurrentColorChanged: Theme.mainColor = currentColor
}
}