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. Rotating Phone
Qt 6.11 is out! See what's new in the release blog

Rotating Phone

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 1.2k Views
  • 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.
  • B Offline
    B Offline
    blurry333
    wrote on last edited by
    #1

    Hello,

    how can I find out if phone is rotated ? More important how do I know if it is portray or landscape

    1 Reply Last reply
    0
    • B Offline
      B Offline
      blurry333
      wrote on last edited by
      #2

      I found something . Screen.Portrait , Screen.Landscape

      Now I need sth like if Screen.Portrait do this ; if Screen.Landscape do something else

      1 Reply Last reply
      0
      • Hamed.MasafiH Offline
        Hamed.MasafiH Offline
        Hamed.Masafi
        wrote on last edited by
        #3
        Screen{
            onOrientationChanged: {
                // do somthing
            }
        }
        

        Remote object sharing (OO RPC)
        http://forum.qt.io/topic/60680/remote-object-sharing-oo-rpc-solved

        Advanced, Powerful and easy to use ORM for Qt5
        https://forum.qt.io/topic/67417/advanced-powerful-and-easy-to-use-orm-for-qt5

        1 Reply Last reply
        0
        • B Offline
          B Offline
          blurry333
          wrote on last edited by
          #4

          that doesn't work!! So what I did is this, but still doesn't work.

          StackView {
              id: stack
              initialItem: landscapeForm
          }
          
          Screen.onOrientationChanged: {
              if (Screen.width > Screen.height)
              {
                  landscapeForm.visible = true
                  mainForm.visible = false
                  stack.push(mainForm)
              }
              else
              {
                  mainForm.visible = true
                  landscapeForm.visible = false
                  stack.pop()
                  stack.push(landscapeForm)
              }
          }
          
          1 Reply Last reply
          0
          • B Offline
            B Offline
            blurry333
            wrote on last edited by
            #5

            any answer ?

            1 Reply Last reply
            0

            • Login

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