Results 1 to 2 of 2

Thread: QWidget repaint on 2nd extend screen during display mode changes.

  1. #1
    Join Date
    Mar 2025
    Posts
    1
    Qt products
    Qt/Embedded
    Platforms
    MacOS X Windows

    Unhappy QWidget repaint on 2nd extend screen during display mode changes.

    Hello, All

    Newbie here.

    Scenario:
    2 monitors connects together. Current Window display mode is extended.
    Widget A is located on extended screen.

    Operation:
    Switch Window display mode from extended to duplicate, back to extend.
    Widget A does not paint correctly. (looks like getting cutted)

    Once I use mouse click on Widget A, drag it and move, Widget A shows correctly.

    Question:
    How can I make Widget A paint properly on extend screen ?

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,304
    Thanks
    313
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QWidget repaint on 2nd extend screen during display mode changes.

    The QGuiApplication and QScreen classes have signals that are emitted when the display configuration changes. I am guessing that your application is not responding to these signals and is not resizing your widgets correctly. Resizing or moving a widget will automatically generate a paint event.

    Look at the signals QGuiApplication::primaryScreenChanged(), QGuiApplication::screenAdded(), and QGuiApplication::screenRemoved() as well as the static methods QGuiApplication::primaryScreen() and QGuiApplication::screens() and the signal QScreen::geometryChanged().
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 1
    Last Post: 30th May 2014, 18:09
  2. Replies: 0
    Last Post: 18th April 2011, 18:11
  3. Replies: 4
    Last Post: 17th October 2010, 23:30
  4. Display a QWidget using multi-screen
    By tarod in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 15:02
  5. Using QGraphicsView as a Splash Screen (repaint issues)
    By chezifresh in forum Qt Programming
    Replies: 3
    Last Post: 4th June 2008, 22:22

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.