Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cancel QTimer singleShot
Forum Updated to NodeBB v4.3 + New Features

Cancel QTimer singleShot

Scheduled Pinned Locked Moved Solved General and Desktop
qtimertimercancel
3 Posts 2 Posters 573 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joe von Habsburg
    wrote on last edited by
    #1

    I would like to cancel singleshot method in trigger time

    timer.singeShot(10000, this, &MyClass:mySlot);
    

    how can I cancel that singleShot ?

    JonBJ 1 Reply Last reply
    0
    • J Joe von Habsburg

      I would like to cancel singleshot method in trigger time

      timer.singeShot(10000, this, &MyClass:mySlot);
      

      how can I cancel that singleShot ?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Joe-von-Habsburg
      I think you cannot with what you have since you have picked a static overload (did you realise that?). Instead use a QTimer instance and use setSingleShot(), then you could stop().

      J 1 Reply Last reply
      4
      • JonBJ JonB

        @Joe-von-Habsburg
        I think you cannot with what you have since you have picked a static overload (did you realise that?). Instead use a QTimer instance and use setSingleShot(), then you could stop().

        J Offline
        J Offline
        Joe von Habsburg
        wrote on last edited by
        #3

        @JonB thank you

        1 Reply Last reply
        0
        • J Joe von Habsburg has marked this topic as solved on

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved