Qt 6.11 is out! See what's new in the release
blog
Exact width of an ApplicationWindow
General and Desktop
3
Posts
3
Posters
1.7k
Views
1
Watching
-
I have an application with "Maximized" ApplicationWindow with width and height defined. How can I get the current size of the window?
@
ApplicationWindow {
id: mainAppWindow
title: "App Window"
flags: Qt.FramelessWindowHint | Qt.TransparentMode
color: "#ebeef0"
visibility: "Maximized"
width: 800
height: 600Rectangle { anchors.fill: parent }}
@When I try to access mainAppWindow.height, it always returns 600 irrespective of the window visibility state. Is it an expected behaviour? How to get the current size of the window?
-
Try using the dimensions of mainAppWindow.contentItem as a proxy for the window size itself. It's more likely to update.