Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How many threads created for QML Application by default ?
Forum Updated to NodeBB v4.3 + New Features

How many threads created for QML Application by default ?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
6 Posts 2 Posters 877 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.
  • V Offline
    V Offline
    Vinoth Rajendran4
    wrote on 5 Aug 2021, 14:11 last edited by Vinoth Rajendran4 8 Jun 2021, 09:30
    #1

    Hi All,
    I have seen in qt documentation that a single thread(GUI thread) is created by program at start-up.
    But i could see bunch of thread in main() function. Can someone help me understand it ?

    Please find the screenshots for reference,

    threads.png

    Here i could see around 8 threads created

    V 1 Reply Last reply 6 Aug 2021, 09:31
    0
    • J jsulm
      6 Aug 2021, 11:36

      @Vinoth-Rajendran4 https://lists.qt-project.org/admin/development

      V Offline
      V Offline
      Vinoth Rajendran4
      wrote on 6 Aug 2021, 13:35 last edited by Vinoth Rajendran4 8 Jun 2021, 13:35
      #6

      @jsulm : I got the answer after posting in mailing list, Thanks for your direction.

      Here is the answer for my query,

      Qt may spawn additional threads internally. ~100% of the time, they're
      invisible to the developer, and used just by Qt for its own purposes. In
      other words, the code you're going to write will run in the main thread
      and you'll never know about the other threads. Just ignore their existence.

      QtQuick has one special thread of you should aware of, which is its
      rendering thread. If you plan to do custom drawing, in C++, using
      QtQuick APIs, then the docs will tell you about this rendering thread
      and how to avoid shooting yourself in the foot. But if you just use
      QtQuick from QML, or use C++ drawing bits that aren't related to QtQuick
      (like QImage, then again everything will be ran in the main/GUI thread.

      1 Reply Last reply
      4
      • V Vinoth Rajendran4
        5 Aug 2021, 14:11

        Hi All,
        I have seen in qt documentation that a single thread(GUI thread) is created by program at start-up.
        But i could see bunch of thread in main() function. Can someone help me understand it ?

        Please find the screenshots for reference,

        threads.png

        Here i could see around 8 threads created

        V Offline
        V Offline
        Vinoth Rajendran4
        wrote on 6 Aug 2021, 09:31 last edited by
        #2

        @Vinoth-Rajendran4 : Any help guys on this topic

        J 1 Reply Last reply 6 Aug 2021, 09:34
        0
        • V Vinoth Rajendran4
          6 Aug 2021, 09:31

          @Vinoth-Rajendran4 : Any help guys on this topic

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 6 Aug 2021, 09:34 last edited by
          #3

          @Vinoth-Rajendran4 I suggest to ask on Qt developers mailing list. People there know Qt internals better.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          V 1 Reply Last reply 6 Aug 2021, 11:35
          0
          • J jsulm
            6 Aug 2021, 09:34

            @Vinoth-Rajendran4 I suggest to ask on Qt developers mailing list. People there know Qt internals better.

            V Offline
            V Offline
            Vinoth Rajendran4
            wrote on 6 Aug 2021, 11:35 last edited by Vinoth Rajendran4 8 Jun 2021, 11:35
            #4

            @jsulm : I could see lot of lists in qt mailing page(https://lists.qt-project.org/admin). Can you help me as to which list I need to ask my queries to ?

            Thanks for the reply

            J 1 Reply Last reply 6 Aug 2021, 11:36
            0
            • V Vinoth Rajendran4
              6 Aug 2021, 11:35

              @jsulm : I could see lot of lists in qt mailing page(https://lists.qt-project.org/admin). Can you help me as to which list I need to ask my queries to ?

              Thanks for the reply

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 6 Aug 2021, 11:36 last edited by
              #5

              @Vinoth-Rajendran4 https://lists.qt-project.org/admin/development

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              V 1 Reply Last reply 6 Aug 2021, 13:35
              2
              • J jsulm
                6 Aug 2021, 11:36

                @Vinoth-Rajendran4 https://lists.qt-project.org/admin/development

                V Offline
                V Offline
                Vinoth Rajendran4
                wrote on 6 Aug 2021, 13:35 last edited by Vinoth Rajendran4 8 Jun 2021, 13:35
                #6

                @jsulm : I got the answer after posting in mailing list, Thanks for your direction.

                Here is the answer for my query,

                Qt may spawn additional threads internally. ~100% of the time, they're
                invisible to the developer, and used just by Qt for its own purposes. In
                other words, the code you're going to write will run in the main thread
                and you'll never know about the other threads. Just ignore their existence.

                QtQuick has one special thread of you should aware of, which is its
                rendering thread. If you plan to do custom drawing, in C++, using
                QtQuick APIs, then the docs will tell you about this rendering thread
                and how to avoid shooting yourself in the foot. But if you just use
                QtQuick from QML, or use C++ drawing bits that aren't related to QtQuick
                (like QImage, then again everything will be ran in the main/GUI thread.

                1 Reply Last reply
                4

                1/6

                5 Aug 2021, 14:11

                • Login

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