Lui*_*DSS 8 qt qmake qt-creator qt5 qt6
我试图遵循 Qt 教程,但收到此错误:
Could not connect "org.freedesktop.IBus" to globalEngineChanged(QString)
Run Code Online (Sandbox Code Playgroud)
我不明白,我的代码看起来足够好,所以我相信我的.pro文件或Qt Creator设置有问题,而且我没有足够的 Qt 经验来修复它。
我尝试用谷歌搜索这个问题,但没有找到解决方案。
这是我的代码:
#include <QApplication>
int main(int argc, char ** argv) {
// Define the QApplication
QApplication app (argc, argv);
// Return the app exec
return app.exec();
}
Run Code Online (Sandbox Code Playgroud)
这是我的.pro文件
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4) : QT += widgets
SOURCES += \
main.cpp
Run Code Online (Sandbox Code Playgroud)
我并没有真正做任何复杂的事情,所以我一定是错过了什么或者做错了什么。
我正在关注的教程是Qt Tutorials For Beginners 3 - First Qt Application,如果它有帮助的话。
如果您不需要ibus,请尝试清除它:
sudo apt purge ibus
Run Code Online (Sandbox Code Playgroud)
这已在Wayland和X11上进行了测试。
请参阅 Qt 论坛上的此帖子:Qt6.5.0 和 ibus (Ubuntu)。
问题已得到解决,请参阅代码 qt io: qt/qtbase.git: IBus: 修复丢失的 Q_SLOTS。