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
    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 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.


  3. #3
    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.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 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.


  5. #5
    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.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 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.


  7. #7
    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.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 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.


  9. #9
    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 .

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 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.


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

    Default Re: inform QWidget that the screen dimensions changed

    Quote Originally Posted by wysota View Post
    So how do you implement screen geometry change?
    Right, the orientation is implemented in the hardware. The app commands the driver to rotate, the driver changes how pixels are written to the screen and changes what geometry (w,h) is reported to the screen driver plugin. As a result, the dimensions of the screen are different, but the full screen window does not pick them up until it re-enters the full screen mode.
    So only the refresh of the screen width and height is required.

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.