Results 1 to 20 of 20

Thread: inform QWidget that the screen dimensions changed

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: inform QWidget that the screen dimensions changed

    repaint and paintEvent are completely unrelated to the problem. They have nothing to do with dimensions of your window.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Oct 2010
    Posts
    14
    Qt products
    Qt4 Qt/Embedded

    Default Re: inform QWidget that the screen dimensions changed

    OK. If the window receives showFullScreen() and it is in full screen it does nothing. It does not check that the screen has been changed. if it is sent resize(0,0) and then showFullScreen() then it occupies the full screen with new width and height.
    The code is trivial. Hardware changed in the background, but the changes are not propagated. Do I need to inform some Qt class that the sceen has been transformed? If yes then how?

    There are two methods in QScreen: isTransformed() and transformOrientation(). Both overwritten by my driver and return true/rotation corresponding the situation. No avail. I did a search through Qt and could see that those functions don't do much themselves, probably orientated on the transformation derived class functionality.

    @wysota: appreciate your answers, thanks.
    Last edited by Dzha; 4th November 2010 at 13:57.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: inform QWidget that the screen dimensions changed

    Quote Originally Posted by Dzha View Post
    OK. If the window receives showFullScreen() and it is in full screen it does nothing. It does not check that the screen has been changed.
    The window does not check anything. It's your (or the window manager's) duty to know the screen size has changed.

    The code is trivial. Hardware changed in the background, but the changes are not proagated.
    Propagated where?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Oct 2010
    Posts
    14
    Qt products
    Qt4 Qt/Embedded

    Default Re: inform QWidget that the screen dimensions changed

    The window does not check anything. It's your (or the window manager's) duty to know the screen size has changed.
    OK. Is there a mechanism for informing the windows manager that the screen is changed?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: inform QWidget that the screen dimensions changed

    You can start by reading what a window manager is.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Oct 2010
    Posts
    14
    Qt products
    Qt4 Qt/Embedded

    Default Re: inform QWidget that the screen dimensions changed

    Well, all I was able to find while reading the window manager documentation was related to resizing the window, which I want to avoid.
    I can not see any method of not leaving the full screen mode (thus avoiding additional repaint) that is described in Qt doc.

    If you are aware of it, please tell me.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: inform QWidget that the screen dimensions changed

    Quote Originally Posted by Dzha View Post
    Well, all I was able to find while reading the window manager documentation
    Which window manager documentation was that?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Oct 2010
    Posts
    14
    Qt products
    Qt4 Qt/Embedded

    Default Re: inform QWidget that the screen dimensions changed

    QWS, Qt for Embedded Linux.

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: inform QWidget that the screen dimensions changed

    Are you using QWS?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    Oct 2010
    Posts
    14
    Qt products
    Qt4 Qt/Embedded

    Default Re: inform QWidget that the screen dimensions changed

    Yes, my main app acts as a QWS server. loads a screen plugin and uses it.

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: inform QWidget that the screen dimensions changed

    If your application is full screen, what do you need QWS for?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #12
    Join Date
    Oct 2010
    Posts
    14
    Qt products
    Qt4 Qt/Embedded

    Default Re: inform QWidget that the screen dimensions changed

    QWS also handles dialogs, input, etc.
    My main window is an instance of QMainWindow .

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: inform QWidget that the screen dimensions changed

    So how do you implement screen geometry change?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Finding a QWidget from a screen XY
    By andyp in forum Qt Programming
    Replies: 5
    Last Post: 26th August 2012, 09:15
  2. Replies: 12
    Last Post: 24th July 2010, 08:12
  3. Replies: 4
    Last Post: 8th August 2008, 17:28
  4. Display a QWidget using multi-screen
    By tarod in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 14:02
  5. Resizing screen dimensions using backbuffer in QT?
    By JimDaniel in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2007, 23:13

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
  •  
Qt is a trademark of The Qt Company.