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. QThread::IsRunning()
QtWS25 Last Chance

QThread::IsRunning()

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 862 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.
  • S Offline
    S Offline
    stephane78
    wrote on last edited by
    #1

    Hi,
    does QThread::IsRunning() return true when the thread is started and run() is executed even if there isn't any call to exec() (no event loop) in the run() method?

    S 1 Reply Last reply
    0
    • S stephane78

      Hi,
      does QThread::IsRunning() return true when the thread is started and run() is executed even if there isn't any call to exec() (no event loop) in the run() method?

      S Offline
      S Offline
      stephane78
      wrote on last edited by
      #2

      as I don't know if it is true, I have put a boolean variable and I set it at the beginning of run() and unset it at the end of run()....

      1 Reply Last reply
      0
      • Chris HennesC Offline
        Chris HennesC Offline
        Chris Hennes
        wrote on last edited by
        #3

        Yes, it will return true even if there is no event loop.

        Chris Hennes, Pioneer Library System

        S 1 Reply Last reply
        2
        • Chris HennesC Chris Hennes

          Yes, it will return true even if there is no event loop.

          S Offline
          S Offline
          stephane78
          wrote on last edited by
          #4

          @Chris-Hennes thank you chris

          1 Reply Last reply
          0

          • Login

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