常见问题¶
QtQuick 未安装¶
问题描述:
qrc:/main.qml:1 module "QtQuick" is not installed
解决办法:
apt install qml-module-qtquick2
QtQuick.Window 未安装¶
问题描述:

qrc:/main.qml:2 module "QtQuick.Window" is not installed
解决办法:
sudo apt install qml-module-qtquick-window2
libQt5Charts.so 缺失¶
问题描述:

error while loading shared libraries: libQt5Charts.so.5:
解决办法:
apt install libqt5charts5
apt install qml-module-qtcharts
libQt5SerialPort.so 缺失¶
问题描述:
error while loading shared libraries: libQt5SerialPort.so.5: cannot open shared object file: No such file or directory
解决办法:
apt install libqt5serialport5
中文乱码¶
看看这里 或许能帮助您理解什么是编码。
乱码就是文件存储时的文本的编码与文件解析时编码不一致造成。
程序中文乱码¶
在main中添加编码格式,程序会按照对应的格式进行解析。
// 设置程序中文编码 QTextCodec::setCodecForLocale(QTextCodec::codecForName(“UTF8”));
虚拟机环境¶
问题描述:

cannot find -lpulse-mainloop-glib
cannot find -lpulse
cannot find -lglib-2.0
解决办法:
apt install pulse-dev
# 或者
sudo apt install libpulse-dev