Results 1 to 3 of 3

Thread: How to make an object blink in Qt?

  1. #1
    Join Date
    Feb 2008
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question How to make an object blink in Qt?

    Hi,

    I have drawn a rectangle and filled it with some color. Now my task is to make the rectangle blink for every 1 second. How to make it possible in Qt? I have been trying with QTimer but it is just changing color from one to another but not blinking. I have one doubt, Is QTimer called only once or continuously? How to make it called continuously? Plese help me as I am really disturbed with this task.

    With Regards
    Thirupathi Uppu

  2. #2
    Join Date
    Jul 2007
    Location
    Bangalore, India
    Posts
    13
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to make an object blink in Qt?

    try this

    Qt Code:
    1. QTimer *timer = new QTimer(this);
    2. connect(timer, SIGNAL(timeout()), this, SLOT(your_Change_Color_function()));
    3. timer->start(1000);
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 22nd February 2008 at 09:19. Reason: missing [code] tags

  3. #3
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to make an object blink in Qt?

    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

Similar Threads

  1. Getting std::string object from QString object ( qt3)
    By joseph in forum Qt Programming
    Replies: 11
    Last Post: 28th March 2013, 20:09
  2. Window OS make distclean && qmake && make one line
    By patrik08 in forum General Programming
    Replies: 4
    Last Post: 22nd March 2007, 10:43
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

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.