[SOLVED] iPhone X - The Screen notch & bottom bar - Qt Quick App - Qt 5.9.2
-
This post is deleted!
-
Maybe this will help
https://stackoverflow.com/questions/55537619/qt-quick-2-ios-notch-avoidance
-
Hi,
perhaps you can get some ideas from my blog ? https://blog.qt.io/blog/2018/10/19/qt-world-summit-2018-conference-app/ -
Thank you, for the support. i will check the repo and update my comments on the same.
coming back to your Question.
I want to render my APP in the safe rendering area as below image (Only in Gray area) Qt 5.9.2
using Qt.MaximizeUsingFullscreenGeometryHint as window flag the APP will cover full screen including the Gree area - which is not what i expected to be. -
@Pradeep-P-N Notch is a quite new "feature" and Qt 5.9.2 is a quite old Qt release. Why don't you switch to a more recent Qt release?
-
@Pradeep-P-N I don't know. Maybe you could back port the Notch related changes from Qt 5.12 (or what ever release invented the Notch support) to Qt 5.9.2. But then you would need to build Qt by yourself.
-
@Pradeep-P-N you can always position your first item with an x-offset. Apple is pretty consistent with the size of it's notch, about 30 pixels should be fine.
-
Hi @ekkescorner
Thank you for the link.
It did help me a bit. I was able to solve the notch issue with Qt 5.9.2 -
@SWood , @J-Hilk , @ekkescorner , @jsulm
Thanks all for the help on the issue and i was able to solve the iPhone X Issue using Qt 5.9.2
My code is simple, as the app is always in Portrait Mode mode
if (Qt.platform.os === "ios") .... // Top Notch margin switch(ScreenHeight * devicePixelRatio) { case 1792: // iPhone_XR; case 2436: // iPhone_X_XS; case 2688: // iPhone_XS_MAX; return 44; default: return 20; } .....
Bottom Bar margin is 34pt assigned with property in the code.
Regards,
Pradeep P N