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. Why 6 threads for a simple app?
QtWS25 Last Chance

Why 6 threads for a simple app?

Scheduled Pinned Locked Moved General and Desktop
9 Posts 5 Posters 4.0k 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.
  • C Offline
    C Offline
    cmayer
    wrote on last edited by
    #1

    I was just wondering why there are 6 threads in task manager when running the simple widgets tutorial example. What are the other non UI threads doing? Is -QT- Qt making a new thread for each individual widget behind the scenes?

    Running the release build of qt-tutorial-01 shows 131 handles and 6 threads, although these numbers fluctuate while the app is just sitting idle. Seems extremely inefficient, in addition to using up almost 11 MB of memory.

    BTW - Do you intend to fix the compile errors? I mean really, in the first tutorial example???

    (Now it's down to 3 threads, no wait, back up to 5 threads - what's going on in there?)

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      There are also OS threads, running in the apps.
      E.g. on Windows, if COM is initialised (AFAIK Qt initialises COM on windows), there are COM threads running. Not each thread is a user created one.

      By the way, which bugs do you mean? in "the docs page":http://doc.qt.nokia.com/4.7/widgets-tutorial.html it should work

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cmayer
        wrote on last edited by
        #3

        Thanks for the info on threads.

        The bugs are on the following URL.
        http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_Tutorial

        Just 2 simple errors:
        Line 18 of widget.h
        Line 16 of widget.cpp

        Easy to fix, but annoying for an absolute beginner.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          [quote author="cmayer" date="1318608554"]
          The bugs are on the following URL.
          http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_Tutorial

          Just 2 simple errors:
          Line 18 of widget.h
          Line 16 of widget.cpp
          [/quote]

          I would assume that the extra ';' you are seeing there is due to a bug in devnet.
          "See this thread":http://developer.qt.nokia.com/forums/viewthread/8336/
          and "here is the bugreport on JIRA":https://bugreports.qt.nokia.com//browse/QTWEBSITE-264
          On JIRA you can vote to raise the importance of this issue.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            [quote author="cmayer" date="1318608554"]Thanks for the info on threads.
            The bugs are on the following URL.
            http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_Tutorial
            [/quote]

            So, you aretalking about the wiki, not the docs :-)
            The wiki acan even be edited by yourself...

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #6

              [quote author="koahnig" date="1318610668"]
              I would assume that the extra ';' you are seeing there is due to a bug in devnet.
              "See this thread":http://developer.qt.nokia.com/forums/viewthread/8336/
              and "here is the bugreport on JIRA":https://bugreports.qt.nokia.com//browse/QTWEBSITE-264
              On JIRA you can vote to raise the importance of this issue. [/quote]

              This bug seems to be fixed, I remove the semicolons and they stay away...

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                This is a test
                @
                void test ( double & tst );
                connect(&tcpSocket, ... );
                @

                [quote author="Gerolf" date="1318613916"]This bug seems to be fixed, I remove the semicolons and they stay away...[/quote]
                You seem to be right. Hopefully, it is fixed and not just vanished for some time. :-)

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mgran
                  wrote on last edited by
                  #8

                  [quote author="koahnig" date="1318614443"]
                  You seem to be right. Hopefully, it is fixed and not just vanished for some time. :-)
                  [/quote]

                  I wouldn't bet on it, the people running this place are not to be trusted! ;)

                  Project Manager - Qt Development Frameworks

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    goetz
                    wrote on last edited by
                    #9

                    [quote author="mariusg" date="1318616170"]
                    I wouldn't bet on it, the people running this place are not to be trusted! ;)[/quote]

                    Just feed them muffins, and they become handsome :-)

                    http://www.catb.org/~esr/faqs/smart-questions.html

                    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