Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] iPhone X - The Screen notch & bottom bar - Qt Quick App - Qt 5.9.2

[SOLVED] iPhone X - The Screen notch & bottom bar - Qt Quick App - Qt 5.9.2

Scheduled Pinned Locked Moved Mobile and Embedded
14 Posts 6 Posters 3.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Pradeep P NP Offline
    Pradeep P NP Offline
    Pradeep P N
    wrote on last edited by Pradeep P N
    #1

    Hello All,

    I am using Qt 5.9.2 and I am looking for a solution to render the Qt Quick App on iPhone X series in the Safe Area without Using Xcode and also without V-Play engine

    Qt.MaximizeUsingFullscreenGeometryHint - will make the app to cover entire screen which is not what i expected.

    Like below which is done using V-Play
    0_1554113175990_40589c86-fd3b-47e3-b054-f911fe9a6dc6-image.png

    Can someone please provide me the solution for it.

    Thanks in advance.

    Pradeep P NP 1 Reply Last reply
    0
    • K Offline
      K Offline
      KoneTaH
      wrote on last edited by KoneTaH
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • Pradeep P NP Pradeep P N

        Hello All,

        I am using Qt 5.9.2 and I am looking for a solution to render the Qt Quick App on iPhone X series in the Safe Area without Using Xcode and also without V-Play engine

        Qt.MaximizeUsingFullscreenGeometryHint - will make the app to cover entire screen which is not what i expected.

        Like below which is done using V-Play
        0_1554113175990_40589c86-fd3b-47e3-b054-f911fe9a6dc6-image.png

        Can someone please provide me the solution for it.

        Thanks in advance.

        Pradeep P NP Offline
        Pradeep P NP Offline
        Pradeep P N
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • S Offline
          S Offline
          SWood
          wrote on last edited by
          #4

          Maybe this will help

          https://stackoverflow.com/questions/55537619/qt-quick-2-ios-notch-avoidance

          Pradeep P NP 1 Reply Last reply
          0
          • J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #5

            Hi,

            maybe my Gitrepo will help you here

            But I'm not entirely sure what exactly you want to do, could you elaborate a bit more?


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            Pradeep P NP 1 Reply Last reply
            1
            • ekkescornerE Offline
              ekkescornerE Offline
              ekkescorner
              Qt Champions 2016
              wrote on last edited by
              #6

              Hi,
              perhaps you can get some ideas from my blog ? https://blog.qt.io/blog/2018/10/19/qt-world-summit-2018-conference-app/

              ekke ... Qt Champion 2016 | 2024 ... mobile business apps
              5.15 --> 6.9 https://t1p.de/ekkeChecklist
              QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

              Pradeep P NP 1 Reply Last reply
              2
              • J.HilkJ J.Hilk

                Hi,

                maybe my Gitrepo will help you here

                But I'm not entirely sure what exactly you want to do, could you elaborate a bit more?

                Pradeep P NP Offline
                Pradeep P NP Offline
                Pradeep P N
                wrote on last edited by Pradeep P N
                #7

                @J.Hilk

                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.

                0_1554867245619_1534dd1e-10eb-4741-b5ca-ce8b148d1563-image.png

                1 Reply Last reply
                1
                • S SWood

                  Maybe this will help

                  https://stackoverflow.com/questions/55537619/qt-quick-2-ios-notch-avoidance

                  Pradeep P NP Offline
                  Pradeep P NP Offline
                  Pradeep P N
                  wrote on last edited by
                  #8

                  @SWood

                  Thank you,
                  But no QPlatformWindow safeAreaMargins() available in Qt 5.9.2

                  jsulmJ 1 Reply Last reply
                  1
                  • Pradeep P NP Pradeep P N

                    @SWood

                    Thank you,
                    But no QPlatformWindow safeAreaMargins() available in Qt 5.9.2

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @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?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    Pradeep P NP 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @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 NP Offline
                      Pradeep P NP Offline
                      Pradeep P N
                      wrote on last edited by Pradeep P N
                      #10

                      @jsulm
                      It works with Qt 5.12.X but i wanted to achieve the same with Qt 5.9.2
                      I agree its old Qt release, in that case you mean no solution available / possible ?

                      jsulmJ J.HilkJ 2 Replies Last reply
                      1
                      • Pradeep P NP Pradeep P N

                        @jsulm
                        It works with Qt 5.12.X but i wanted to achieve the same with Qt 5.9.2
                        I agree its old Qt release, in that case you mean no solution available / possible ?

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @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.

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • Pradeep P NP Pradeep P N

                          @jsulm
                          It works with Qt 5.12.X but i wanted to achieve the same with Qt 5.9.2
                          I agree its old Qt release, in that case you mean no solution available / possible ?

                          J.HilkJ Offline
                          J.HilkJ Offline
                          J.Hilk
                          Moderators
                          wrote on last edited by
                          #12

                          @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.


                          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                          Q: What's that?
                          A: It's blue light.
                          Q: What does it do?
                          A: It turns blue.

                          1 Reply Last reply
                          0
                          • ekkescornerE ekkescorner

                            Hi,
                            perhaps you can get some ideas from my blog ? https://blog.qt.io/blog/2018/10/19/qt-world-summit-2018-conference-app/

                            Pradeep P NP Offline
                            Pradeep P NP Offline
                            Pradeep P N
                            wrote on last edited by
                            #13

                            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

                            1 Reply Last reply
                            1
                            • Pradeep P NP Offline
                              Pradeep P NP Offline
                              Pradeep P N
                              wrote on last edited by Pradeep P N
                              #14

                              @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

                              1 Reply Last reply
                              2

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved