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. Cannot #include<QQuickStyle>

Cannot #include<QQuickStyle>

Scheduled Pinned Locked Moved Solved QML and Qt Quick
7 Posts 6 Posters 7.8k 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.
  • F Offline
    F Offline
    fraz
    wrote on 17 Jan 2018, 20:08 last edited by
    #1

    For some reason I can't include QQuickStyle. The error message I get on compilation is

    /home/name/projects/SLDQuick/main.cpp:3: error: QQuickStyle: No such file or directory
     #include <QQuickStyle>
              ^~~~~~~~~~~~~
    

    Any help?

    1 Reply Last reply
    1
    • J Offline
      J Offline
      jpnurmi
      wrote on 17 Jan 2018, 20:12 last edited by
      #2

      Add QT += quickcontrols2 in the .pro file.

      G 1 Reply Last reply 1 Mar 2024, 01:51
      10
      • J jpnurmi
        17 Jan 2018, 20:12

        Add QT += quickcontrols2 in the .pro file.

        G Offline
        G Offline
        ggalt
        wrote on 1 Mar 2024, 01:51 last edited by
        #3

        @jpnurmi Any idea WTF to include with cmake??? I find it incredibly frustrating that Qt 6.6 documentation only tells you how to include this in a .pro file when most of us switched to cmake years ago!

        S 1 Reply Last reply 1 Mar 2024, 19:59
        0
        • G ggalt
          1 Mar 2024, 01:51

          @jpnurmi Any idea WTF to include with cmake??? I find it incredibly frustrating that Qt 6.6 documentation only tells you how to include this in a .pro file when most of us switched to cmake years ago!

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 1 Mar 2024, 19:59 last edited by
          #4

          @ggalt The second line of the table a the top of the class documentation gives you the exact cmake instructions

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          T J 2 Replies Last reply 30 Jun 2024, 01:47
          2
          • S SGaist
            1 Mar 2024, 19:59

            @ggalt The second line of the table a the top of the class documentation gives you the exact cmake instructions

            T Offline
            T Offline
            Tom asso
            wrote on 30 Jun 2024, 01:47 last edited by Tom asso
            #5

            @SGaist - I am still on Qt5 - what is the cmake instruction for that? I get a cmake error:

            find_package(
              Qt5
              COMPONENTS Gui Widgets Quick QuickControls2
              REQUIRED)
            

            Gives:

            CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
              Could not find a package configuration file provided by "Qt5QuickControls2"
              with any of the following names:
            
                Qt5QuickControls2Config.cmake
                qt5quickcontrols2-config.cmake
            
            S 1 Reply Last reply 30 Jun 2024, 19:15
            0
            • T Tom asso
              30 Jun 2024, 01:47

              @SGaist - I am still on Qt5 - what is the cmake instruction for that? I get a cmake error:

              find_package(
                Qt5
                COMPONENTS Gui Widgets Quick QuickControls2
                REQUIRED)
              

              Gives:

              CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package):
                Could not find a package configuration file provided by "Qt5QuickControls2"
                with any of the following names:
              
                  Qt5QuickControls2Config.cmake
                  qt5quickcontrols2-config.cmake
              
              S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 30 Jun 2024, 19:15 last edited by
              #6

              @Tom-asso hi,

              The configuration looks good.

              Did you install the corresponding development package ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S SGaist
                1 Mar 2024, 19:59

                @ggalt The second line of the table a the top of the class documentation gives you the exact cmake instructions

                J Offline
                J Offline
                jimmyCAO
                wrote on 9 Jul 2024, 01:18 last edited by
                #7

                @SGaist said in Cannot #include<QQuickStyle>:

                ine of the table a th

                yes ,it's there exactly。 thank you for resolving my problem

                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