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. How to call QTimer::single shot from a static functiom
Forum Updated to NodeBB v4.3 + New Features

How to call QTimer::single shot from a static functiom

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 653 Views 2 Watching
  • 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    How to call QTimer::single shot from a static functiom

    JKSHJ 1 Reply Last reply
    0
    • Q Qt Enthusiast

      How to call QTimer::single shot from a static functiom

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @Qt-Enthusiast said in How to call QTimer::single shot from a static functiom:

      How to call QTimer::single shot from a static functiom

      The same way you call any other function from a static function.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      2
      • Q Offline
        Q Offline
        Qt Enthusiast
        wrote on last edited by
        #3

        can some one please code

        JKSHJ 1 Reply Last reply
        0
        • Q Qt Enthusiast

          can some one please code

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @Qt-Enthusiast said in How to call QTimer::single shot from a static functiom:

          can some one please code

          First, show us how you normally write a static function.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          7
          • VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by VRonin
            #5
            void staticFunction()
            {
            QTimer::singleShot(0,[]()->void{qDebug("Hello World!");});
            }
            

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            1 Reply Last reply
            4

            • Login

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