How to style Menu or MenuBar component
-
wrote on 10 Mar 2014, 22:59 last edited by
I can't see any "style" property on those, neither I can see MenuStyle component.
How do we style those ?What about StatusBar component ?
I see a StatusBarStyle component : http://qt-project.org/doc/qt-5/qml-qtquick-controls-styles-statusbarstyle.html
but no "style" property in StatusBar documentation : http://qt-project.org/doc/qt-5/qml-qtquick-controls-statusbar.html -
wrote on 11 Mar 2014, 12:17 last edited by
We are adding those in 5.3.0 actually. StatusBar can already be styled by simply assigning a different item to it though:
i.e statusBar: Rectangle {...}
-
wrote on 11 Mar 2014, 12:28 last edited by
Great :)
Yes statusbar it is working, it is just the style property that is missing StatusBar documentation.
Another question, assume I have a whole software populate with lots of Button, CheckBox... components. Is there a way to style them all without editing each code to replace Button -> MyButton or to add the "style: MyButtonStyle" ?
I search for something like an Application wide style, where you could define for example :
@
ApplicationStyle {
buttonStyle: MyButtonStyle { ... }
checkboxstyle: MyCheckboxStyle {...}
....
}
@
and all Buttons through the application will fetch that style unless another style is specified. -
wrote on 11 Mar 2014, 13:00 last edited by
Not yet. We are currently investigating how to make it easier to deploy themes. At the moment there is no real official way to do it. It is however possible to set the QT_QUICK_CONTROLS_STYLE environment variable to point to a subdirectory you provide containing a different set of default style delegates though.
-
wrote on 11 Mar 2014, 21:07 last edited by
What about styling a GroupBox ?
Can't find GroupBoxStyle in Qt5.2 but there's some on the net:
https://qt.gitorious.org/qt/qtquickcontrols/source/88e867cbeedd9063a08b9c401a8e56d0fb43d17b:src/styles/GroupBoxStyle.qml
http://download.qt-project.org/ministro/android/qt5/objects/5.106-armeabi-v7a/qml/QtQuick/Controls/Styles/GroupBoxStyle.qmlWhen is it planned ?
Is it possible to write our own by inheriting Style ? (I see some private imports there...)Thanks
5/5