3 ms·
If your existing app is a pure CLI app, you just expose your Qt objects to qml and it should be fairly smooth sailing. If your existing app is a QWidgets app,
by saidinesh5 3y ago
If your existing app is a pure CLI app, you just expose your Qt objects to qml and it should be fairly smooth sailing.
If your existing app is a QWidgets app, then not sure how much benefit you'd have when mixing QML/QtQuick with your QWidgets side of things. We did implement such a thing at a little project before... where the "canvas of items" was written in QML and the remainder of the UI was QWidgets. For our usecase, it was good.
- mardifoufs 3y agoAwesome that's exactly what I was wondering. Yeah, my app is mostly qwidgets with the layout in code. It's pretty painful to do the layout so QML does look tempting. At least it's probably better than doing it with qtdesigner!
- saidinesh5 3y agoAh. Anchor based layouts are nice and work well until they don't. Especially when dealing with multiple resolutions, different sized content/padding etc.. They did work really well in simpler projects of mine though. When using QtQuickControls2 , i have started falling back to RowLayout, ColumnLayout, GridLayout etc: https://doc.qt.io/qt-6/qtquicklayouts-overview.html https://doc.qt.io/qt-6/qtquicklayouts-overview.html - which are similar to what we've had in QWidgets