Before I start, know that I’m really trying not to think I know better than anyone, so I apologize if this somehow seems condescending.
I’m trying to learn QML, because KDE’s new convergent framework kirigami is dependent upon it, so the expectation is that it’s the easier, newer, better toolkit. It also allows for multiple backends using different languages. Seems like the perfect improvement.
That’s not been my experience.
For example, when I tried to use the MenuBar {}
, Button {}
, and Text {}
elements, I had to individually mandate that the text be rendered using the platform-native render, since QML’s was awful. There was no QML toggle, and no documented way of using the C++ attribute via python3
.
That leads to having to use monstrosities like this
Button {
/* if (root.visibility != Window.FullScreen {
visible: false
} */
Text {
anchors.centerIn: parent
text: qsTr("Quit")
renderType: Text.NativeRendering
color: system_text_color
}
Why isn’t native text rendering the default anyway, like it is with QtWidgets
?
Anyway, notice the color: system_text_color
? That’s a custom property. If I don’t set that, when using breeze-dark
, the text is black on dark grey. I therefore have to force it to use the system palette.
// @origin https://stackoverflow.com/a/59691219/9731176
SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
property color system_text_color: myPalette.text
Again, why is this not the default…?
Then there’s just the fact that half of the libraries I’ve installed simply don’t work:
And there’s no documentation on how one is supposed to install a QML library, nor a tool like pip3
.
I might just be a really bad programmer, but I’m not having nearly as much trouble with QtWidgets
via Python. I want to create adaptive experiences that are cross-platform and depend upon KDE’s newer technologies, but QtQuick
+qml
seems really difficult.