Results 1 to 3 of 3

Thread: QGraphicsItem / QGraphicsProxyWidget: how to make it flash?

  1. #1
    Join Date
    Jan 2008
    Posts
    56
    Thanks
    7
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QGraphicsItem / QGraphicsProxyWidget: how to make it flash?

    Hi all,

    I can animate my QGraphicsProxyWidget with QGraphicsItemAnimation and do all kind of things with QPropertyAnimation.
    But, is there a simple solution to make the widget flash two or three times?
    I could use QPropertyAnimation with palette but that seems to be too complicated for such a simple task.

    Rainer

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QGraphicsItem / QGraphicsProxyWidget: how to make it flash?

    Where is the problem? just set more points in the animation. E.g. you want to flash a white widget to black use:
    Qt Code:
    1. animation->setStartValue(Qt::white);
    2. animation->setKeyValueAt ( 0.2, Qt::black); // and this use several times to different time steps
    3. animation->setEndValue(Qt::white);
    To copy to clipboard, switch view to plain text mode 
    or use QAbstractAnimation::setLoopCount().
    Last edited by Lykurg; 14th February 2010 at 17:03.

  3. The following user says thank you to Lykurg for this useful post:

    RThaden (14th February 2010)

  4. #3
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QGraphicsItem / QGraphicsProxyWidget: how to make it flash?

    Deleted. It was a double post since my browser went crazy...

Similar Threads

  1. Replies: 3
    Last Post: 15th February 2010, 22:07
  2. QGraphicsItem or QGraphicsProxyWidget?
    By ttvo in forum Qt Programming
    Replies: 5
    Last Post: 31st August 2009, 00:13
  3. QGraphicsProxyWidget
    By QbelcorT in forum Qt Programming
    Replies: 0
    Last Post: 29th November 2008, 09:21
  4. How to make group Of QGraphicsItem ..
    By ashishsaryar in forum Qt Programming
    Replies: 3
    Last Post: 4th February 2008, 14:14
  5. How can I make the cursor flash?
    By cslijy in forum Qt Programming
    Replies: 2
    Last Post: 1st January 2008, 12:51

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.