Results 1 to 2 of 2

Thread: Widget for Symbian with ShowMaximized() does not have the correct height

  1. #1
    Join Date
    Sep 2010
    Posts
    11
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Default Widget for Symbian with ShowMaximized() does not have the correct height

    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:

    Qt Code:
    1. void MainWindow::resizeEvent(QResizeEvent *event)
    2. {
    3. qDebug() << "Width: " << event->size().width() << " Height: " << event->size().height();
    4. QMainWindow::resizeEvent(event);
    5. }
    To copy to clipboard, switch view to plain text mode 

    The output when starting the program on a Series 60 5.0 Touch device (resolution 360x640) is:
    Qt Code:
    1. [Qt Message] Width: 360 Height: 640
    2. [Qt Message] Width: 360 Height: 487
    3. [Qt Message] Width: 360 Height: 640
    To copy to clipboard, switch view to plain text mode 

    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!

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Widget for Symbian with ShowMaximized() does not have the correct height


  3. The following user says thank you to tbscope for this useful post:

    skeletor (7th September 2010)

Similar Threads

  1. Replies: 5
    Last Post: 19th March 2010, 18:13
  2. problems with getting height and width of widget
    By martinn in forum Qt Programming
    Replies: 3
    Last Post: 10th March 2010, 03:04
  3. Impossible to get correct widget background color
    By croscato in forum Qt Programming
    Replies: 4
    Last Post: 8th June 2009, 21:42
  4. Replies: 6
    Last Post: 14th April 2009, 17:40
  5. Replies: 5
    Last Post: 4th November 2007, 11:35

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.