[SOLVED]QML Settings Type seems to have no effect on window size.
-
I have decided to use
Qt.labs.settings 1.0
to save the state of my window in this manner:ApplicationWindow { // Main configuration section for the application window id: mainwindow visible: true // Needed if loading from c++. property string accentchosen: "#F4511E" height: Units.dp(600) minimumHeight: Units.dp(500) maximumHeight: Units.dp(1200) width: Units.dp(800) minimumWidth: Units.dp(300) maximumWidth: Units.dp(1080) Settings { id: settings property alias x: mainwindow.x property alias y: mainwindow.y property alias width: mainwindow.width property alias height: mainwindow.height property alias accentchosen: mainwindow.accentchosen }
This code will result in my application starting on the x and y position it was last on, but its width and height do not seem to follow their last state, instead they keep being 600x800.
According to the docs the second time, and each subsequent time after that it should remember its state. Am I doing something wrong?
-
This function comes from the qml-material module that can be found here. It will simply return a new number based on the pixel density of the device, in order for the units to be screen independent. Now since what I get is a number I imagined nothing would go wrong.
PS: I should have provided all this info from the start, I apologize about that.
-
This function comes from the qml-material module that can be found here. It will simply return a new number based on the pixel density of the device, in order for the units to be screen independent. Now since what I get is a number I imagined nothing would go wrong.
PS: I should have provided all this info from the start, I apologize about that.
-
OK, Just created a new issue https://bugreports.qt.io/browse/QTBUG-51697