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 956 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 last edited by Vinoth Rajendran4
    #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
    0
    • jsulmJ jsulm

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

      V Offline
      V Offline
      Vinoth Rajendran4
      wrote on last edited by Vinoth Rajendran4
      #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

        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 last edited by
        #2

        @Vinoth-Rajendran4 : Any help guys on this topic

        jsulmJ 1 Reply Last reply
        0
        • V Vinoth Rajendran4

          @Vinoth-Rajendran4 : Any help guys on this topic

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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
          0
          • jsulmJ jsulm

            @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 last edited by Vinoth Rajendran4
            #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

            jsulmJ 1 Reply Last reply
            0
            • V Vinoth Rajendran4

              @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

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on 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
              2
              • jsulmJ jsulm

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

                V Offline
                V Offline
                Vinoth Rajendran4
                wrote on last edited by Vinoth Rajendran4
                #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

                • Login

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