Screen.height off by 80 pixels on iOS
-
I'm using Qt 6.5 and I'm discovering that the screen height number returned by Screen.height does correspond to the documented view port size for a given iPhone (e.g. 12 Pro). However, it seems to be off by 80 pixels. It might be due to the "safe area" height but I'm not sure. Can anyone shed some light on this? Is it a bug? Has this changed in 6.6? Does the same issue exist on Android?
-
I'm using Qt 6.5 and I'm discovering that the screen height number returned by Screen.height does correspond to the documented view port size for a given iPhone (e.g. 12 Pro). However, it seems to be off by 80 pixels. It might be due to the "safe area" height but I'm not sure. Can anyone shed some light on this? Is it a bug? Has this changed in 6.6? Does the same issue exist on Android?
@RogueWarrior In the following way you can get full screen display. Then you can get the right screen size.
ApplicationWindow { id: mainAppWindow visible: true visibility: Window.FullScreen
-
@RogueWarrior In the following way you can get full screen display. Then you can get the right screen size.
ApplicationWindow { id: mainAppWindow visible: true visibility: Window.FullScreen
@JoeCFD I'll try that. I'm working on an Android version and the full screen mode is nice in that the bottom toolbar isn't always there but I'm now noticing that the same code on Android is doing weird things. Not only is the screen height off by 20 pixels but the value Screen.height is actually changing on the fly. On a Samsung Galaxy phone, the value starts out at 730 but then a few seconds after the main window appears on launch, the value jumps to 800. So far, I can't see any reason why this would happen.
It really obvious because I have an element anchored to the bottom edge.
-
@JoeCFD I'll try that. I'm working on an Android version and the full screen mode is nice in that the bottom toolbar isn't always there but I'm now noticing that the same code on Android is doing weird things. Not only is the screen height off by 20 pixels but the value Screen.height is actually changing on the fly. On a Samsung Galaxy phone, the value starts out at 730 but then a few seconds after the main window appears on launch, the value jumps to 800. So far, I can't see any reason why this would happen.
It really obvious because I have an element anchored to the bottom edge.
@RogueWarrior I guess the gap is the title area height in Android. Therefore, Screen.height is kind of misleading.