Second window overlaps maximum screen size on actual device.
-
just a typical launching of another window?
@void MainWindow::on_toolButton_clicked()
{
MainWindow2 *mw2;mw2 = new MainWindow2; this->hide(); mw2->show();
}
@
once the tool button is pressed, it will show this with normal size boundaries and no overlapping
!http://img713.imageshack.us/img713/8622/27516056.png(n95 simulator)!
but on actual device, the button "hide" is way over below and you can't see it anymore and the text area almost occupies the whole screen.
is this common? i'm using qt 4.6 on s60 third edition FP1.
-
If i am not wrong the resolution of a 3rd edition phone is 320 x 240 pixels. Try not to hardcode the values. You can get the screen size by using this: @QDesktopWidget *desktop = QApplication::desktop();
QRect screenSize = desktop->screenGeometry();@You can set the geometry of your main widget to fit the device screen size then you should not be facing the stretched widgets problem.
Try setting the max width and height of the text filed if required.
PS: QApplication::desktop()->availableGeometry() gives wrong geometry "Available Geometry Bug on Symbian":http://bugreports.qt.nokia.com/browse/QTBUG-14058
-
Well i think that setting the geometry is needed for displaying the second window Ui properly, mostly i have observed that ui where geometry is set for a layout does not view properly so better to take this layout which you are using on a widget and then set geometry for that widget.
May be you wont be able to reproduce it on simulator but on device it should work. -
just an update, it seems that it's a Qt 4.6 symbian bug? and that to go around with it, is to use mainwindow.showMaximized() rather than just mainwindow.show()
still, getting the screen size and then setting the geometry should have it's uses should i run into resizing problems in the future. thanks!