0
对不起,我的英语不好。 如何在qt中使用kde库? 我搜索和谷歌这个,但没有很好的答案。 CPP文件如何在qt中使用kde库?
#include <QCoreApplication>
#include <QDebug>
#include <KDE/KWindowSystem>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
qDebug() << "Hello World";
// bool wayland = KWindowSystem::isPlatformWayland();
// qDebug() << wayland;
// KWindowSystem::self();
foreach (const auto &wid, KWindowSystem::self()->stackingOrder()) {
qDebug() << "Hi";
}
return a.exec();
}
亲文件
######################################################################
# Automatically generated by qmake (3.1) Tue Mar 7 02:09:59 2017
######################################################################
TEMPLATE = app
TARGET = firstqt
INCLUDEPATH += /usr/include/KF5/KWindowSystem .
# Input
SOURCES += main.cpp
LIBS += -lkdeui
我得到错误: 鱼:“./firstqt”通过信号SIGSEGV(地址边界错误)
感谢提前终止。
我再次搜索,发现LIBS + = -lkdeui是kde4,它必须是LIBS + = -lKF5WindowSystem –