Qt5アプリケーションでlibqxtをリンクする際に問題があります。
ドキュメントの例のようなコードを書きますが、エラーがあります。
QxtGlobalShortcut* shortcut = new QxtGlobalShortcut(this);
connect(shortcut, SIGNAL(activated()), this, SLOT(newScreenshoot()));
shortcut->setShortcut(QKeySequence("Ctrl+Shift+F12"));
私はQt 5.0.1を使用しています:
damian@damian-Lenovo-B560:~$ qmake --version
QMake version 3.0
Using Qt version 5.0.1 in /usr/lib/i386-linux-gnu
そして、 Ubuntu 13.04リポジトリからの最新のlibqxt-dev 。
次のリンカー エラーがあります。
/home/damian/Dokumenty/Programowanie/QShot/mainwindow.cpp:20: error: undefined reference to `QxtGlobalShortcut::QxtGlobalShortcut(QObject*)'
/home/damian/Dokumenty/Programowanie/QShot/mainwindow.cpp:22: error: undefined reference to `QxtGlobalShortcut::setShortcut(QKeySequence const&)'