Qt & iPhone X & The Screen
-
So,
finally my new iPhone arrived, #hype.
Naturally I want to my Apps also to run on the new device.As expected of Qt, simply compiling with the new ios sdk and copying the files on the device works out of the box without a problem.
Qt 5.9.2 and ios sdk 11.1 and ios(on Phone) 11.1.2But, I'm running in some issues about accessing the whole screen.
When I first started my app, I was pleasently surprised.
- In Portait- Mode, My App started right below the "notch" and went all the way down to the edge, with the home indicator on top.
- In Landscape-Mode, the whole width and the whole height of the screen is filled out, and the notch cuts some part of the screen area of, still ok and expected.
Now, I want my background to extend, in portait-mode, to the very top, and this is where I run into issues.
I can't access the top part as valid screen area. I did some testing and the following are my results.
The issue is my root item. It is by default a
QtQuick.Window
Window
-Item.
If I useQtQuick.Window
version 2.1 or 2.2 or 2.3 I can't access the top part. If I use version 2.0 the top part becomes available, but the bottom part, the one with the "home inducator" becomes inaccessable and black.So I thought, ok, lets make it a simple
Rectangle
. That however results in a complete black screen.
So I tested a QWidgets app, and those seem to behave like aQtQuick.Window
version 2.1 or 2.2 or 2.3 aka Black unaccessable top but screen goes all the way to the bottom.At this point, I'm a very confused Panda.
Anyone has an idea on how to fix this issue? Or is this something I should, if noone has already done that, bring to the bug tracker and hope for a
speedy
fix?Greetings
-
Alright, thanks you,
I did end up filling a bugreport
to be found hereI'll let the thread open untill I have a fix/work around.
-
A quick update on this.
Someone got asigned to it, and theres a
workaround
, in the in the broader sense of the word.
There's theQt::WindowStates
flagQt::MaximizeUsingFullscreenGeometryHint
that you can set://QWidgets: { //e.g. Constructor setWindowFlag(Qt::MaximizeUsingFullscreenGeometryHint, true); } //QML: import QtQuick.Window 2.1 // Import needs to be higher than 2.0 Window{ flags: Qt.MaximizeUsingFullscreenGeometryHint id: window ..... }
now the App fills the whole screen in Portrait-and Landscapemode.
Tor Arne Vestbø, to whom the ticket was asigned to, says an automatic content margin is in the making, but untill than one has to adjust the UI oneself.
Tor Arne Vestbø
said in QTBUG-64574:If you set the Qt::MaximizeUsingFullscreenGeometryHint window flag, the window will also cover the area under the statusbar, etc. But we don't have any APIs to automatically add margins for the inner content, the stuff you don't want under the statusbar, so for now you have to do that manually. I'm working on the latter as we speak.
I had no idea, that that window flag existed, or was not aktivated by default - on mobile apps.
I can work with that. The ticket is still open but my problems are solved. I'll close this topic.