QMainWindow layout bug in landscape mode on Symbian S60v5 and Symbian^3
When I put many widgets in QMainWindow, it shows them normal in portrait mode, but in landscape mode these widgets are stretching out of the screen and become inaccessible. I’ve reproduced it on Nokia 5800ExpressMusic and Nokia N8 with the same result. Qt version is 4.6.3.
Here some screenshots of the sample application: Portrait mode [pixelpipe.com], Landscape mode [pixelpipe.com]
Here is the code:
- #include <QApplication>
- #include <QVBoxLayout>
- #include <QPushButton>
- #include <QCheckBox>
- #include <QTextEdit>
- #include <QMainWindow>
- int main (int argc, char * argv[])
- {
- QMainWindow wnd;
- layout->addWidget(textEd1);
- layout->addWidget(textEd2);
- layout->addWidget(chkBox);
- layout->addWidget(optsButton);
- layout->addWidget(exitButton);
- wnd.setCentralWidget(window);
- #if defined(Q_WS_S60)
- wnd.showMaximized();
- #else
- wnd.show();
- #endif
- return app.exec();
- }
Is it bug or maybe I’m doing something wrong?
—
Best regards,
VP
2 replies
Hello Vasyl,
I just wrote an article [developer.symbian.org] about lists on Symbian devices. While the focus is on customizing lists, it also addresses handling a resize event for orientation and laying the widgets properly. You might check it out.
-hth
John
You must log in to post a reply. Not a member yet? Register here!

