3 ms·
So I have used QML plenty too and it isn't all that great honestly. In fact in many ways it is backwards. For example, all Qt widgets instantiated via C++ can
by gnufied 11y ago
So I have used QML plenty too and it isn't all that great honestly. In fact in many ways it is backwards.
For example, all Qt widgets instantiated via C++ can be styled using an external stylesheet, but not so for QML stuff. All the margin, padding you have to specify inline in the code. If that is not going backwards, I dunno what is.
- jalfresi 11y agoAh well that may be an area I've yet to encounter - I've used a third-party set of qml widgets styled to adhere to googles material visual vocab, so it has been trivial to style up applications that look and act fantastic. Though I will say that the inability to expose a go strict/object as a model is quite frustrating; there's lots of back and forth mapping your go objects to update your qml models. It would be much nicer if it was easy to implement as adhering to an interface or embedding an existing type :(
- zanny 11y agoYou can style Qt Quick Controls, which are the QtWidgets equivalent objects in QML. http://doc.qt.io/qt-5/qtquickcontrolsstyles-index.html http://doc.qt.io/qt-5/qtquickcontrolsstyles-index.html This is how many new apps are coming out using QML and doing their own custom UI theming rather than doing system default. It also beats the hell out of CSS by using the same object model relationships you are already using when laying out QML objects. Yes, if you use language primitives like rect's and text's then you have to create either your own theming engine template classes and then use those, or manually manage all the styling per object. But then you are doing it wrong if your project does not warrant that kind of ground up custom craftsmanship.