Results 1 to 4 of 4

Thread: Question about QTimer and slots

  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Question about QTimer and slots

    Hello
    So, I have a Qtimer and I connect it to a slot.
    When I receive a signal, the qtimer connects to another slot.
    I assumed that QTimer would disconnect from the first slot but it doesn't, it run both slots simultaneously.
    How do I disconnect the qtimer from the 1st slot?

    Thanks!
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: Question about QTimer and slots

    How about QObject::disconnect()?

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

    hakermania (17th July 2011)

  4. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Question about QTimer and slots

    You use disconnect
    LE: too late

  5. The following user says thank you to Zlatomir for this useful post:

    hakermania (17th July 2011)

  6. #4
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Question about QTimer and slots

    Good Thanks both
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

Similar Threads

  1. QTimer / QThread question
    By Galen in forum Newbie
    Replies: 13
    Last Post: 20th April 2010, 21:39
  2. Simple QTimer Question
    By shiranraviv in forum Qt Programming
    Replies: 5
    Last Post: 8th November 2009, 13:13
  3. Question about QTimer
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 5
    Last Post: 8th August 2009, 05:25
  4. QTimer Question
    By ComaWhite in forum Qt Programming
    Replies: 4
    Last Post: 1st August 2008, 18:07
  5. Replies: 1
    Last Post: 6th April 2006, 12:24

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.