Best practice to save and restore QML ApplicationWindow state and geometry
Unsolved
QML and Qt Quick
-
Hi folks,
hope you can help me out. There is a best practice documentation for QWidget to save and restore window geometry and status: link. I tested that extensively and it works really great. I even detached a second monitor on Windows and it worked as expected.
What would be the best practice for QML ApplicationWindow. I could not find any top level class that would derive from QWidget and provide those functions.
Cheers
Uwe
-
@Uwe-Koehler I am using
Settings
component from Qt.labs.settingsSettings { id: mainSettings property alias x: mainWindow.x property alias y: mainWindow.y property alias width: mainWindow.width property alias height: mainWindow.height }
Example Code in real project:
https://github.com/benlau/sparkqml/blob/master/app/sparkqml/main.qml#L26