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. Does QML support native look-and-feel on Windows?
Forum Updated to NodeBB v4.3 + New Features

Does QML support native look-and-feel on Windows?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
13 Posts 3 Posters 4.0k 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    I am working on a little application that should (in the end) run on Windows 7 through 10 and some Linux distributions.

    With Widgets, I am pretty much used to getting the native look and feel by default. With QML, I only see the styles "Default", "Material" and "Universal". Does QML not support native styling out-of-the-box?

    raven-worxR 1 Reply Last reply
    0
    • A Asperamanca

      I am working on a little application that should (in the end) run on Windows 7 through 10 and some Linux distributions.

      With Widgets, I am pretty much used to getting the native look and feel by default. With QML, I only see the styles "Default", "Material" and "Universal". Does QML not support native styling out-of-the-box?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Asperamanca
      you need to use the QtQuick.Controls module
      Those docs say:

      Note: We are using QApplication and not QGuiApplication in this example. Though you can use QGuiApplication instead, doing this will eliminate platform-dependent styling. This is because it is relying on the widget module to provide the native look and feel.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      A 1 Reply Last reply
      0
      • raven-worxR raven-worx

        @Asperamanca
        you need to use the QtQuick.Controls module
        Those docs say:

        Note: We are using QApplication and not QGuiApplication in this example. Though you can use QGuiApplication instead, doing this will eliminate platform-dependent styling. This is because it is relying on the widget module to provide the native look and feel.

        A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        @raven-worx said in Does QML support native look-and-feel on Windows?:

        @Asperamanca
        you need to use the QtQuick.Controls module
        Those docs say:

        Note: We are using QApplication and not QGuiApplication in this example. Though you can use QGuiApplication instead, doing this will eliminate platform-dependent styling. This is because it is relying on the widget module to provide the native look and feel.

        I was looking at the Gallery sample, but the one for Qt Quick Controls 2. There, I don't have any native style.
        Does that mean that native styling is only supported by Qt Quick Controls 1?

        raven-worxR 1 Reply Last reply
        0
        • A Asperamanca

          @raven-worx said in Does QML support native look-and-feel on Windows?:

          @Asperamanca
          you need to use the QtQuick.Controls module
          Those docs say:

          Note: We are using QApplication and not QGuiApplication in this example. Though you can use QGuiApplication instead, doing this will eliminate platform-dependent styling. This is because it is relying on the widget module to provide the native look and feel.

          I was looking at the Gallery sample, but the one for Qt Quick Controls 2. There, I don't have any native style.
          Does that mean that native styling is only supported by Qt Quick Controls 1?

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @Asperamanca said in Does QML support native look-and-feel on Windows?:

          Does that mean that native styling is only supported by Qt Quick Controls 1?

          yes

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Asperamanca
            wrote on last edited by
            #5

            Thanks for clarifying that.

            My enthusiasm trying out QML just took a hit. Sure, I can stick to Qt Quick Controls 1, but they are not extended anymore, so I might as well stick to widgets.

            raven-worxR 1 Reply Last reply
            0
            • A Asperamanca

              Thanks for clarifying that.

              My enthusiasm trying out QML just took a hit. Sure, I can stick to Qt Quick Controls 1, but they are not extended anymore, so I might as well stick to widgets.

              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on last edited by
              #6

              @Asperamanca
              my personal preference is
              QtWidgets for Desktop
              QML for mobile/touch devices

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              KevinMQtK A 2 Replies Last reply
              2
              • raven-worxR raven-worx

                @Asperamanca
                my personal preference is
                QtWidgets for Desktop
                QML for mobile/touch devices

                KevinMQtK Offline
                KevinMQtK Offline
                KevinMQt
                wrote on last edited by
                #7

                @raven-worx said in Does QML support native look-and-feel on Windows?:

                @Asperamanca
                my personal preference is
                QtWidgets for Desktop
                QML for mobile/touch devices

                Bo Thorsen also expressed a similar view back in 2015: https://lists.qt-project.org/pipermail/interest/2015-June/017412.html

                It's 2019, do you still hold the same view that Qt Widgets is best for native looking Desktop(Win,Mac,Linux) applications and Qt Quick/QML is best for Mobile & Embedded. Qt Designer is the drag and drop tool(rapid prototyping) for Qt Widgets, is it in active development? I'm asking this because on Qt website about UI tools it's not listed. https://www.qt.io/design I was thinking if Qt Widgets is still in use then Qt Designer should be added there.

                raven-worxR 1 Reply Last reply
                0
                • raven-worxR raven-worx

                  @Asperamanca
                  my personal preference is
                  QtWidgets for Desktop
                  QML for mobile/touch devices

                  A Offline
                  A Offline
                  Asperamanca
                  wrote on last edited by
                  #8

                  @raven-worx said in Does QML support native look-and-feel on Windows?:

                  @Asperamanca
                  my personal preference is
                  QtWidgets for Desktop
                  QML for mobile/touch devices

                  And what do you do it the same code (logically, not necessary the identical GUI) should run on both?
                  E.g. either a PC/Notebook or a large touchscreen / touch notebook?

                  1 Reply Last reply
                  0
                  • KevinMQtK KevinMQt

                    @raven-worx said in Does QML support native look-and-feel on Windows?:

                    @Asperamanca
                    my personal preference is
                    QtWidgets for Desktop
                    QML for mobile/touch devices

                    Bo Thorsen also expressed a similar view back in 2015: https://lists.qt-project.org/pipermail/interest/2015-June/017412.html

                    It's 2019, do you still hold the same view that Qt Widgets is best for native looking Desktop(Win,Mac,Linux) applications and Qt Quick/QML is best for Mobile & Embedded. Qt Designer is the drag and drop tool(rapid prototyping) for Qt Widgets, is it in active development? I'm asking this because on Qt website about UI tools it's not listed. https://www.qt.io/design I was thinking if Qt Widgets is still in use then Qt Designer should be added there.

                    raven-worxR Offline
                    raven-worxR Offline
                    raven-worx
                    Moderators
                    wrote on last edited by
                    #9

                    @KevinMQt said in Does QML support native look-and-feel on Windows?:

                    It's 2019, do you still hold the same view that Qt Widgets is best for native looking Desktop(Win,Mac,Linux) applications and Qt Quick/QML is best for Mobile & Embedded

                    yes, i (personally) do.

                    Qt Designer is the drag and drop tool(rapid prototyping) for Qt Widgets, is it in active development?

                    it's part of QtCreator, so yes. Also there is QtDesignStudio in the meantime available.

                    And what do you do it the same code (logically, not necessary the identical GUI) should run on both?

                    There is no true right/wrong.
                    It als heavily depends on your UI. Nevertheless its possible to share the same backend (C++ data logic) and only use QtWidgets and QML for the UI (see the MVC pattern for example).
                    See https://doc.qt.io/qt-5/qtqml-cppintegration-data.html

                    --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                    If you have a question please use the forum so others can benefit from the solution in the future

                    A 1 Reply Last reply
                    1
                    • raven-worxR raven-worx

                      @KevinMQt said in Does QML support native look-and-feel on Windows?:

                      It's 2019, do you still hold the same view that Qt Widgets is best for native looking Desktop(Win,Mac,Linux) applications and Qt Quick/QML is best for Mobile & Embedded

                      yes, i (personally) do.

                      Qt Designer is the drag and drop tool(rapid prototyping) for Qt Widgets, is it in active development?

                      it's part of QtCreator, so yes. Also there is QtDesignStudio in the meantime available.

                      And what do you do it the same code (logically, not necessary the identical GUI) should run on both?

                      There is no true right/wrong.
                      It als heavily depends on your UI. Nevertheless its possible to share the same backend (C++ data logic) and only use QtWidgets and QML for the UI (see the MVC pattern for example).
                      See https://doc.qt.io/qt-5/qtqml-cppintegration-data.html

                      A Offline
                      A Offline
                      Asperamanca
                      wrote on last edited by
                      #10

                      @raven-worx said in Does QML support native look-and-feel on Windows?:

                      @KevinMQt said in Does QML support native look-and-feel on Windows?:

                      It's 2019, do you still hold the same view that Qt Widgets is best for native looking Desktop(Win,Mac,Linux) applications and Qt Quick/QML is best for Mobile & Embedded

                      yes, i (personally) do.

                      Qt Designer is the drag and drop tool(rapid prototyping) for Qt Widgets, is it in active development?

                      it's part of QtCreator, so yes. Also there is QtDesignStudio in the meantime available.

                      And what do you do it the same code (logically, not necessary the identical GUI) should run on both?

                      There is no true right/wrong.
                      It als heavily depends on your UI. Nevertheless its possible to share the same backend (C++ data logic) and only use QtWidgets and QML for the UI (see the MVC pattern for example).
                      See https://doc.qt.io/qt-5/qtqml-cppintegration-data.html

                      Did you share the right link? I don't see any mention of MVC or "model" in the article.
                      Also, for scenes that have complex logic in the loading code, my impression so far is that generating QML scenes from C++ (via template QML files) must by necessity be very slow compared to creating a scene directly in GraphicsView.

                      raven-worxR 1 Reply Last reply
                      0
                      • A Asperamanca

                        @raven-worx said in Does QML support native look-and-feel on Windows?:

                        @KevinMQt said in Does QML support native look-and-feel on Windows?:

                        It's 2019, do you still hold the same view that Qt Widgets is best for native looking Desktop(Win,Mac,Linux) applications and Qt Quick/QML is best for Mobile & Embedded

                        yes, i (personally) do.

                        Qt Designer is the drag and drop tool(rapid prototyping) for Qt Widgets, is it in active development?

                        it's part of QtCreator, so yes. Also there is QtDesignStudio in the meantime available.

                        And what do you do it the same code (logically, not necessary the identical GUI) should run on both?

                        There is no true right/wrong.
                        It als heavily depends on your UI. Nevertheless its possible to share the same backend (C++ data logic) and only use QtWidgets and QML for the UI (see the MVC pattern for example).
                        See https://doc.qt.io/qt-5/qtqml-cppintegration-data.html

                        Did you share the right link? I don't see any mention of MVC or "model" in the article.
                        Also, for scenes that have complex logic in the loading code, my impression so far is that generating QML scenes from C++ (via template QML files) must by necessity be very slow compared to creating a scene directly in GraphicsView.

                        raven-worxR Offline
                        raven-worxR Offline
                        raven-worx
                        Moderators
                        wrote on last edited by
                        #11

                        @Asperamanca said in Does QML support native look-and-feel on Windows?:

                        Did you share the right link? I don't see any mention of MVC or "model" in the article.

                        MVC is a generic software pattern to separate logic from representation (UI).
                        https://en.wikipedia.org/wiki/Model–view–controller

                        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                        If you have a question please use the forum so others can benefit from the solution in the future

                        A 1 Reply Last reply
                        0
                        • raven-worxR raven-worx

                          @Asperamanca said in Does QML support native look-and-feel on Windows?:

                          Did you share the right link? I don't see any mention of MVC or "model" in the article.

                          MVC is a generic software pattern to separate logic from representation (UI).
                          https://en.wikipedia.org/wiki/Model–view–controller

                          A Offline
                          A Offline
                          Asperamanca
                          wrote on last edited by
                          #12

                          @raven-worx said in Does QML support native look-and-feel on Windows?:

                          @Asperamanca said in Does QML support native look-and-feel on Windows?:

                          Did you share the right link? I don't see any mention of MVC or "model" in the article.

                          MVC is a generic software pattern to separate logic from representation (UI).
                          https://en.wikipedia.org/wiki/Model–view–controller

                          Yeah, I know that one. I was just wondering what the link you originally shared had to do with it.

                          raven-worxR 1 Reply Last reply
                          0
                          • A Asperamanca

                            @raven-worx said in Does QML support native look-and-feel on Windows?:

                            @Asperamanca said in Does QML support native look-and-feel on Windows?:

                            Did you share the right link? I don't see any mention of MVC or "model" in the article.

                            MVC is a generic software pattern to separate logic from representation (UI).
                            https://en.wikipedia.org/wiki/Model–view–controller

                            Yeah, I know that one. I was just wondering what the link you originally shared had to do with it.

                            raven-worxR Offline
                            raven-worxR Offline
                            raven-worx
                            Moderators
                            wrote on last edited by
                            #13

                            @Asperamanca said in Does QML support native look-and-feel on Windows?:

                            I was just wondering what the link you originally shared had to do with it.

                            it is about how C++ data types (backend) can be sent to QML (UI) and vice versa.

                            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                            If you have a question please use the forum so others can benefit from the solution in the future

                            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