Results 1 to 1 of 1

Thread: QVariantAnimation causes flickering on QWidget

  1. #1
    Join Date
    Jun 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QVariantAnimation causes flickering on QWidget

    Hi,

    I'm using Qt 4.6 Cocoa libs under MAC OS X 10.6. I'm trying to create a window which is able to resize animated. Therefor I'm using the QVariantAnimation. If I'm donig so, the resizing causes annoying nimation, Ming, if the widget has actually no parent or/and has window frame with the typical window controls (close-, minimize- maximize button).

    The code I'm using is:
    Qt Code:
    1. QPropertyAnimation* animation = new QPropertyAnimation(this, "size", this);
    2. QSize newSize = this->size();
    3. newSize.setHeight(400);
    4.  
    5. animation->setEasingCurve( QEasingCurve::InSine);
    6. animation->setDuration(100);
    7.  
    8. animation->setEndValue(newSize);
    9.  
    10. QObject::connect(animation, SIGNAL(finished()), this, SLOT(animationDidFinish()));
    11. animation->start( QAbstractAnimation::DeleteWhenStopped );
    To copy to clipboard, switch view to plain text mode 

    It doesn't matter if I#m using the size or geometry property. It seems to do this flcikering when updating it's geometry.
    Does anyone has an idea how to avoid this?

    Thanks
    Stefan
    Last edited by lamgi667; 3rd June 2010 at 10:07.

Similar Threads

  1. Flickering problem
    By yagabey in forum Qt Programming
    Replies: 2
    Last Post: 5th May 2010, 12:25
  2. GraphicsItem is flickering
    By anafor2004 in forum Qt Programming
    Replies: 3
    Last Post: 30th September 2009, 11:44
  3. Flickering
    By Pembar in forum Qt Programming
    Replies: 2
    Last Post: 19th May 2009, 19:21
  4. QtOgreFramework flickering with qt 4.5
    By Angelo Moriconi in forum Qt Programming
    Replies: 2
    Last Post: 6th April 2009, 10:52
  5. QFileDialog flickering
    By invictus in forum Newbie
    Replies: 8
    Last Post: 17th April 2008, 09:47

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.