Results 1 to 8 of 8

Thread: How to "flush" display?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    142
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: How to "flush" display?

    Quote Originally Posted by Brandybuck View Post
    repaint() does not work on all platforms. You can only paint to a widget (including to an item in a scene rendered by a QGraphicsView widget) during a paint event.

    I don't understand your original problem though. Why would you want to paint an item immediately after painting it? The user would not be able to see the first paint because it would happen so fast. Why not just paint the item once? In your mouseReleaseEvent() you can set an appropriate state on the item and call update(). Then in paintEvent() drw the item according to the state you set.
    That's what I did but the paintEvent() is not processed until I put a window on top of my application window and show it again.

  2. #2
    Join Date
    Mar 2006
    Posts
    142
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: How to "flush" display?

    I have fixed the problem: it is a Mac issue because the same code compiled on Linux works well.

Similar Threads

  1. Replies: 12
    Last Post: 7th September 2011, 16:37
  2. Replies: 8
    Last Post: 18th March 2011, 11:27
  3. OS/X how to get physical display handle
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 3rd January 2009, 19:51
  4. Display only PNG image on desktop
    By durbrak in forum Qt Programming
    Replies: 32
    Last Post: 15th March 2008, 21:55
  5. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 07:08

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.