Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to change layout on QMainWindow on maemo when device is rotated?
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
Yash last edited by
Is python works different from c++ .I mean ,are there any different functions.
I don't have any exp on mobile / maemo .
ok, do you know in c++ succsessfully secuense ops?
baysmith last edited by
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.
harryF last edited by
"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.
QBoxLayot helps me
johnk last edited by
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.