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. How to change layout on QMainWindow on maemo when device is rotated?
Forum Updated to NodeBB v4.3 + New Features

How to change layout on QMainWindow on maemo when device is rotated?

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

    Hello!
    I'm writing some Python's code on maemo5. when device is rotated i must repack widgets, but I can't change mainwindow's layout. how can I do that on Python? tnanx

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      Yash
      wrote on last edited by
      #2

      Is python works different from c++ .I mean ,are there any different functions.

      I don't have any exp on mobile / maemo .

      http://kineticwing.com : Web IDE, QSS Editor
      http://speedovation.com : Development Lab

      1 Reply Last reply
      0
      • B Offline
        B Offline
        borunov
        wrote on last edited by
        #3

        ok, do you know in c++ succsessfully secuense ops?

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

          If you put the contents of the main window in a QWidget, you'll be able to change its layout without having to change the main window's layout.

          Nokia Certified Qt Specialist.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            harryF
            wrote on last edited by
            #5

            "QDesktopWidget::resized()":http://doc.qt.nokia.com/4.6/qdesktopwidget.html# should tell you when the screen resolution changes (and it does when rotating the device, since width and height are swapped).

            However, if you use Qt layouts, the widgets should automatically adapt to the new screen resolution.

            // happy hacking

            1 Reply Last reply
            0
            • B Offline
              B Offline
              borunov
              wrote on last edited by
              #6

              QBoxLayot helps me

              1 Reply Last reply
              0
              • J Offline
                J Offline
                johnk
                wrote on last edited by
                #7

                Hello,

                Others have cover the layout, the new "Sensor API":http://doc.qt.nokia.com/qtmobility-1.0/sensors-api.html from the Qt Mobility project may be of interest too. In addition to QOrientationSensor, it has QAccelerometer.

                -jk

                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