Cannot #include<QQuickStyle>
Solved
QML and Qt Quick
-
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?
-
Add
QT += quickcontrols2
in the .pro file. -
@ggalt The second line of the table a the top of the class documentation gives you the exact cmake instructions
-
@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
-
-
@SGaist said in Cannot #include<QQuickStyle>:
ine of the table a th
yes ,it's there exactly。 thank you for resolving my problem