import QtQuick.Controls 2.0 not working - QQmlApplicationEngine failed to load component PyQT——多线程(QThread)
linux
在线安装
sudo apt-get install -y qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtcreator qtdeclarative5-dev qtquickcontrols2-5-dev
查看版本
qmake --version
问题
QtQuick.Controls 未注册
QtQuick.Controls": Cannot protect module QtQuick.Controls 2 as it was never registered
- 解决
sudo apt install qml-module-qtquick-controls2
安装模块
sudo apt install qml-module-qtquick-dialogs
windows
离线安装
在线安装
- 下载
https://download.qt.io/official_releases/online_installers/
- 安装
./qt-unified-windows-x64-X.X.X-online.exe --mirror https://mirror.nju.edu.cn/qt