×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    44

    What is up with QDesktopWidget::screenGeometry???!

    I recently stumbled upon this bug in Qt 4.7.0: http://bugreports.qt.nokia.com/browse/QTBUG-14058

    A quote from that page:
    "QApplication::desktop()->availableGeometry() will now report correct geometry if called AFTER the resize event has been handled"
    This is being said, as if it makes some kind of sense! Well, it doesn't! The screen geometry can't change, so there is no reason to wait 'till the resize event has been sent!

    This also affects screenGeometry, it seems.

    So what was wrong with the original Qt specification, which states that screenGeometry () "Returns the geometry of the screen with index screen. The default screen is used if screen is -1." (no conditions).

    I can't understand these Nokia amateurs who seem to be breaking Qt bit by bit!

    Any ideas or comments anyone?!
    Last edited by mikaellaine; 2011-01-26 at 13:02.

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: What is up with QDesktopWidget::screenGeometry???!

    There is a possibility to workaround this issue with QWidget::frameGeometry().

  3. #3
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    183

    Re: What is up with QDesktopWidget::screenGeometry???!

    Note that QDesktopWidget has both screenGeometry (that matches the screensize) and availableGeometry that (direct quote from Qt SDK): "What is available will be subrect of screenGeometry() based on what the platform decides is available" (emphasis mine).
    In Symbian port of Qt, the availableGeometry has been connected to the CAknAppUi::ClientRect(). And as we know, the ClientRect() changes according to orientation.

    What is lacking from Symbian version of QDekstopWidget is a proper multiscreen handling.

  4. #4
    Registered User
    Join Date
    Jan 2004
    Posts
    44

    Re: What is up with QDesktopWidget::screenGeometry???!

    I don't see how your comment on availableGeometry has anything to do with this topic, but thanks anyway.

    The problem is, that screenGeometry has now started to return "QRect(0,0 -1x-1)" instead of a valid screen geometry. This is clearly wrong, and contrary to the Qt specification, which does not specify any conditions. screenGeometry should always return a valid screen geometry.

    Oh, and by the way, this did work in 4.6.x

  5. #5
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    183

    Re: What is up with QDesktopWidget::screenGeometry???!

    Your original post mentions twice availableGeometry() so I assumed that it is relevant. For example:
    "So what was wrong with the original Qt specification, which states that availableGeometry() "Returns the geometry of the screen with index screen. The default screen is used if screen is -1." (no conditions)."
    (which actually refers to QDesktopWidget::screenGeometry() API description http://doc.qt.nokia.com/4.7/qdesktop...screenGeometry)

    Sorry for making this assumption.

  6. #6
    Registered User
    Join Date
    Jan 2004
    Posts
    44

    Re: What is up with QDesktopWidget::screenGeometry???!

    Oops, sorry Fuzzbender. Indeed I failed to talk about screenGeometry, as I meant to.

  7. #7
    Registered User
    Join Date
    Jan 2011
    Location
    Jaipur
    Posts
    12

    Re: What is up with QDesktopWidget::screenGeometry???!

    hiii nothing working

  8. #8
    Registered User
    Join Date
    Jan 2004
    Posts
    44

    Re: What is up with QDesktopWidget::screenGeometry???!

    Hi Diggubhai. What I find I have to do between 4.6.x and 4.7.x is that instead of using screenGeometry immediately, I call it when my main widget receives the resizeEvent. Its really lame and I hope Nokia fixes this.

    On the other hand, 4.7.x is to be taken as a tech preview anyway, and it can't be used for products...

  9. #9
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    183

    Re: What is up with QDesktopWidget::screenGeometry???!

    No problems, these things happen.

    I tried to search the bug report database for the situation you mentioned, but I couldn't find one. Maybe my search-fu is just poor.
    I think I have seen the spurious resize event as well.
    Mikaellaine, could you report a bug about the thing, so it gets sorted out? To here: http://bugreports.qt.nokia.com/

Similar Threads

  1. Replies: 2
    Last Post: 2009-11-17, 07:11
  2. What is up with the new right hand column?
    By Nokia Ron in forum News and Announcements
    Replies: 0
    Last Post: 2006-12-13, 16:27
  3. What is the call set-up time of the Nokia 30?
    By Nokia_FAQ in forum Nokia M2M
    Replies: 1
    Last Post: 2002-05-14, 15:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×