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. Detect orientation changed. How?
Forum Updated to NodeBB v4.3 + New Features

Detect orientation changed. How?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 662 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
    bogong
    wrote on last edited by
    #1

    Hello all!
    What is the best way to detect orientation change on device in QT? I've been doing to through native iOS/Java implementation and by detecting width/height change. Is there in Qt standard way to detect it in-box?

    1 Reply Last reply
    0
    • ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #2

      QScreen class has isLandscape /isPortrait functions

      B 1 Reply Last reply
      0
      • ODБOïO ODБOï

        QScreen class has isLandscape /isPortrait functions

        B Offline
        B Offline
        bogong
        wrote on last edited by
        #3

        @LeLev I know it. The question is "to detect orientation change on device in QT". I need to detect event of changing orientation but not the current state of orientation. I mean kind of signal.

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

          Solution found https://doc.qt.io/qt-5/qscreen.html#orientationChanged. Issue closed. Example published here

          1 Reply Last reply
          1

          • Login

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