PDA

View Full Version : Widget for Symbian with ShowMaximized() does not have the correct height



skeletor
7th September 2010, 01:57
I was using the example application in 4.6\widgets\softkeys to test formats of widgets in various modes (maximized vs fullscreen with/without soft keys), and I discovered a problem in the initial size of the application after it starts.

I added the following to find out how often the resize event is called:



void MainWindow::resizeEvent(QResizeEvent *event)
{
qDebug() << "Width: " << event->size().width() << " Height: " << event->size().height();
QMainWindow::resizeEvent(event);
}


The output when starting the program on a Series 60 5.0 Touch device (resolution 360x640) is:


[Qt Message] Width: 360 Height: 640
[Qt Message] Width: 360 Height: 487
[Qt Message] Width: 360 Height: 640


I would expect the widget (QMainWindow) to have a size of 360x487 when it starts, because it begins in Maximized mode with softkeys displayed, which reduces the app height. But it appears that after the call to app.exec(), the height is resized to 640 again.

If I change the orientation of the device to landscape, then portrait again, it resizes properly to 360x487.

Any ideas why this is incorrect when it starts? I don't want to assume this is a bug, but it seems strange, and this is a qt example, not my code.

The reason I ask this, is that I am building my own application using QGraphicsView, and the main window size is key for determining the resolution of the device and to set up proper scaling, etc.

Thanks in advance for your help!

tbscope
7th September 2010, 06:31
It's a bug.
http://bugreports.qt.nokia.com/browse/QTBUG-4776
and related bugs