ApplicationWindow width and height is not setting properly on Visibility changed
Unsolved
QML and Qt Quick
-
On restore down of window we are setting the Application window's height and width to 1280720, When application is launched and we drag the Application window for the first time, window's height and width is not setting to 1280720.
Code sample :
import QtQuick 2.12
import QtQuick.Window 2.15
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.12ApplicationWindow {
id:mainWindow1
visible: true
flags: Qt.Window
visibility: Qt.WindowFullScreen
minimumWidth:1280 //Later min width will be defined
minimumHeight:720//Later min height will be defined
color: "gray"onVisibilityChanged: { if(mainWindow1.visibility == 4){ mainWindow1.width = Screen.width mainWindow1.height = Screen.height } else if(mainWindow1.visibility == 2) { mainWindow1.width = 1280 mainWindow1.height = 720 } }
}