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 FINALLY do asynchronous background worker with QThread

How to FINALLY do asynchronous background worker with QThread

Scheduled Pinned Locked Moved General and Desktop
qthreadthreadsthreadparallelasynchronous
12 Posts 5 Posters 7.3k 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.
  • timdayT timday

    I'll save other folks the trouble of clicking the above link by pointing out that there seems to be no "useful new stuff" actually on the site, just an invitation to submit an email address so you can be mailed the info. It's like Tim Berners-Lee had never been born.

    mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #3

    @timday said:

    Tim Berners-Lee
    you comment made me smile :)

    On a site note, it looks very nice and inviting and he made a whole site just to scam people's emails. :)

    V 1 Reply Last reply
    0
    • timdayT timday

      I'll save other folks the trouble of clicking the above link by pointing out that there seems to be no "useful new stuff" actually on the site, just an invitation to submit an email address so you can be mailed the info. It's like Tim Berners-Lee had never been born.

      V Offline
      V Offline
      Viktor Jamrich
      wrote on last edited by
      #4

      @timday Hey timday,
      why do you think there's no useful stuff?

      It took me like 2 weeks until I sticked
      all the info from the web into a
      working thing...

      Do you know any good posts on
      how to use threads in Qt?

      Thanks.

      1 Reply Last reply
      0
      • mrjjM mrjj

        @timday said:

        Tim Berners-Lee
        you comment made me smile :)

        On a site note, it looks very nice and inviting and he made a whole site just to scam people's emails. :)

        V Offline
        V Offline
        Viktor Jamrich
        wrote on last edited by
        #5

        @mrjj said:

        On a site note, it looks very nice and inviting and he made a whole site just to scam people's emails. :)

        Hey mrjj,
        where have you learned to use QThread correctly?

        If you all guys found it easily on the net,
        then I'd better stop wasting my time, uff.

        Thanks for feedback.

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by Chris Kawa
          #6

          The documentation examples show exactly the two recommended ways: a worker object and subclassing QThread.
          For a rationale behind these examples you can refer to this article and its linked predecessor that shows what not to do.

          V 1 Reply Last reply
          0
          • Chris KawaC Chris Kawa

            The documentation examples show exactly the two recommended ways: a worker object and subclassing QThread.
            For a rationale behind these examples you can refer to this article and its linked predecessor that shows what not to do.

            V Offline
            V Offline
            Viktor Jamrich
            wrote on last edited by
            #7

            @Chris-Kawa said:

            The documentation examples show exactly the two recommended ways: a worker object and subclassing QThread.
            For a rationale behind these examples you can refer to this article and its liknked predecessor that shows what not to do.

            Thanks for the links Chris,
            that's exactly the stuff I had problem with ;)

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #8

              I also found this one interresting
              https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/

              JKSHJ 1 Reply Last reply
              0
              • JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #9

                Hi @Viktor-Jamrich, if you were truly trying to help other users with your website, then I apologize for deleting your post as spam. However, I still recommend posting your notes on the site directly. Asking people for their email addresses is a bit suspicious.

                Anyway, to answer your question, see the following items in the official documentation (plus the articles that @Chris-Kawa gave you):

                • Multithreading Technologies in Qt -- Qt has many ways of using threads, not just QThread. This article shows you how to choose the best way.
                • Synchronizing Threads -- This article talks about how to safely transfer data between threads.
                • QObject|Thread Affinity -- This section describes how signals and slots work between threads.

                that's exactly the stuff I had problem with ;)

                If you still have problems, please feel free to post questions here. I'm confident that the community will help you out.

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

                mrjjM 1 Reply Last reply
                1
                • mrjjM mrjj

                  I also found this one interresting
                  https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/

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

                  @mrjj said:

                  I also found this one interresting
                  https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/

                  Please note that the Worker-Object approach described in this blog post is valid if you want to use signals and slots between threads. However, if you don't need signals and slots, then the Worker-Object approach is an overkill.

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

                  mrjjM 1 Reply Last reply
                  0
                  • JKSHJ JKSH

                    Hi @Viktor-Jamrich, if you were truly trying to help other users with your website, then I apologize for deleting your post as spam. However, I still recommend posting your notes on the site directly. Asking people for their email addresses is a bit suspicious.

                    Anyway, to answer your question, see the following items in the official documentation (plus the articles that @Chris-Kawa gave you):

                    • Multithreading Technologies in Qt -- Qt has many ways of using threads, not just QThread. This article shows you how to choose the best way.
                    • Synchronizing Threads -- This article talks about how to safely transfer data between threads.
                    • QObject|Thread Affinity -- This section describes how signals and slots work between threads.

                    that's exactly the stuff I had problem with ;)

                    If you still have problems, please feel free to post questions here. I'm confident that the community will help you out.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #11

                    @JKSH
                    Well if you do give him email, then you get a "Locked Content" thing which you can "open" with Liking on facebook.
                    So do not feel bad as even if it was to help people it is still way to scammy. IMHO

                    1 Reply Last reply
                    1
                    • JKSHJ JKSH

                      @mrjj said:

                      I also found this one interresting
                      https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/

                      Please note that the Worker-Object approach described in this blog post is valid if you want to use signals and slots between threads. However, if you don't need signals and slots, then the Worker-Object approach is an overkill.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      @JKSH
                      Oh, did not catch that difference. Thank you.

                      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