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>
Forum Updated to NodeBB v4.3 + New Features

Cannot #include<QQuickStyle>

Scheduled Pinned Locked Moved Solved QML and Qt Quick
7 Posts 6 Posters 7.9k 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.
  • F Offline
    F Offline
    fraz
    wrote on 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
    • jpnurmiJ Offline
      jpnurmiJ Offline
      jpnurmi
      wrote on last edited by
      #2

      Add QT += quickcontrols2 in the .pro file.

      G 1 Reply Last reply
      10
      • jpnurmiJ jpnurmi

        Add QT += quickcontrols2 in the .pro file.

        G Offline
        G Offline
        ggalt
        wrote on 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!

        SGaistS 1 Reply Last reply
        0
        • G ggalt

          @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!

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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

          Tom assoT J 2 Replies Last reply
          2
          • SGaistS SGaist

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

            Tom assoT Offline
            Tom assoT Offline
            Tom asso
            wrote on 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
            
            SGaistS 1 Reply Last reply
            0
            • Tom assoT Tom asso

              @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
              
              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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
              • SGaistS SGaist

                @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 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