Results 1 to 3 of 3

Thread: Flickering

  1. #1
    Join Date
    May 2009
    Posts
    30
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Red face Flickering

    Hey guys,

    I have a widget which I would like to hide a part of it (at least for a while). I am currently using "setMask" to hide part of the QDialog. Initially the entire widget is supposed to be invisible and slowly I "unmask" the widget. The problem is that when I call "show()", the entire widget flickers out showing the entire widget before disappearing.

    I was wondering if there was anyway to avoid that "flicker"?

    Thanks much

    Regards,
    Pembar

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Flickering

    How fast are you unmasking the widget ?

  3. #3
    Join Date
    May 2009
    Location
    Rio de Janeiro/RJ/Brazil
    Posts
    20
    Thanks
    5
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Flickering

    Take a look at http://doc.trolltech.com/4.5.1/qwidget.html#paintEvent

    It says that slow or complex widgets can use PaintEvent::region() to optimize its drawing operation. It returns a rectangular area that must be actually updated. Then you can set a clipping area with QPainter::setClipRegion() so the surrounding area remains unaffected, thus not flickering.

Similar Threads

  1. QtOgreFramework flickering with qt 4.5
    By Angelo Moriconi in forum Qt Programming
    Replies: 2
    Last Post: 6th April 2009, 10:52
  2. Image Viewer Example and Flickering
    By babu198649 in forum Newbie
    Replies: 0
    Last Post: 7th August 2008, 15:42
  3. QFileDialog flickering
    By invictus in forum Newbie
    Replies: 8
    Last Post: 17th April 2008, 09:47
  4. Painting / moving in a single step to avoid flickering
    By nooky59 in forum Qt Programming
    Replies: 6
    Last Post: 21st February 2008, 10:33
  5. how to avoid QCanvasText flickering (Qt336)
    By oob2 in forum Qt Programming
    Replies: 5
    Last Post: 5th September 2006, 19:25

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.