Unsolved Failed to find Qt component "Widgets"
-
Hi
After installing Qt on a new ubuntu 21.10 installation when I try to start a new project I get this error:
Found package configuration file: /home/ppitu/Qt/6.2.0/gcc_64/lib/cmake/Qt6/Qt6Config.cmake but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND. Reason given by package: Failed to find Qt component "Widgets". Expected Config file at "/home/ppitu/Qt/6.2.0/gcc_64/lib/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake" exists
How can I solve this problem?
-
Hi,
How are you starting your new project ?
Qt Creator ?
Command line ? -
I have the same problem. I used QtCreator to create QtApplication with QtWidget and selected CMake. How to solve it?
-
Do you have the widgets module listed as dependencies in your cmake project ?
-
I had the same issue and found the answer here
-
@Jianer thank you