我试图遵循 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,如果它有帮助的话。