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.
  • V Offline
    V Offline
    Viktor Jamrich
    wrote on 24 Jul 2015, 22:25 last edited by JKSH
    #1

    [Spam deleted. Entertaining replies below retained :) --JKSH]

    1 Reply Last reply
    1
    • T Offline
      T Offline
      timday
      wrote on 24 Jul 2015, 23:21 last edited by
      #2

      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.

      M V 2 Replies Last reply 25 Jul 2015, 00:11
      0
      • T timday
        24 Jul 2015, 23:21

        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.

        M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 25 Jul 2015, 00:11 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 25 Jul 2015, 08:33
        0
        • T timday
          24 Jul 2015, 23:21

          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 25 Jul 2015, 08:28 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
          • M mrjj
            25 Jul 2015, 00:11

            @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 25 Jul 2015, 08:33 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
            • C Offline
              C Offline
              Chris Kawa
              Lifetime Qt Champion
              wrote on 25 Jul 2015, 08:42 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 25 Jul 2015, 09:42
              0
              • C Chris Kawa
                25 Jul 2015, 08:42

                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 25 Jul 2015, 09:42 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
                • M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 25 Jul 2015, 09:59 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/

                  J 1 Reply Last reply 25 Jul 2015, 12:25
                  0
                  • J Offline
                    J Offline
                    JKSH
                    Moderators
                    wrote on 25 Jul 2015, 12:23 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

                    M 1 Reply Last reply 25 Jul 2015, 12:26
                    1
                    • M mrjj
                      25 Jul 2015, 09:59

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

                      J Offline
                      J Offline
                      JKSH
                      Moderators
                      wrote on 25 Jul 2015, 12:25 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

                      M 1 Reply Last reply 25 Jul 2015, 12:27
                      0
                      • J JKSH
                        25 Jul 2015, 12:23

                        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.

                        M Offline
                        M Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on 25 Jul 2015, 12:26 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
                        • J JKSH
                          25 Jul 2015, 12:25

                          @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.

                          M Offline
                          M Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on 25 Jul 2015, 12:27 last edited by
                          #12

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

                          1 Reply Last reply
                          0

                          1/12

                          24 Jul 2015, 22:25

                          • Login

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