3 ms·
I mean that it's much easier to write apps that change their layout based on window size. Especially if you want to target both a desktop app and a mobile app u
by rubymamis 2y ago
I mean that it's much easier to write apps that change their layout based on window size. Especially if you want to target both a desktop app and a mobile app using the same codebase. QML is great for that.
QML is definitely getting better in regard to type checking. For example, you can annotate a list with a type:
property list<int> myNumbers: [1, 2, 3]
You can annotate a signal with the expected types:
signal onThisChange(x: int, str : string)
Etc.
You can also ENABLE_TYPE_COMPILER[1][2] to convert QML files to C++ which require you to type your code in order to work, but I don't really have experience with that.
I'm sure there are even more examples I'm missing. There was a discussion regarding TypeScript support in QML[3] but I guess they decided to do it their own way[4].
[1] https://doc.qt.io/qt-6/qtqml-qml-type-compiler.html https://doc.qt.io/qt-6/qtqml-qml-type-compiler.html
[2] https://www.qt.io/blog/compiling-qml-to-c-qtquick-controls-and-optional-imports https://www.qt.io/blog/compiling-qml-to-c-qtquick-controls-a...
[3] https://bugreports.qt.io/browse/QTBUG-63600 https://bugreports.qt.io/browse/QTBUG-63600
[4] https://bugreports.qt.io/browse/QTBUG-68791 https://bugreports.qt.io/browse/QTBUG-68791