Important: Please read the Qt Code of Conduct -

Having issues getting Qxt to work properly in QtCreator (Qt5.2.1)..

  • I'm working on a Qt5/QtQuick/QML application that's supposed to use QxtGlobalShortcut for hotkey control when the application is hidden or out of focus. I've been developing it using QtCreator on Linux, and I'm not entirely familiar with Linux development so I may have missed something simple.

    First off, I tried cloning the master branch of the Qxt git repo from here. But for some reason ./configure failed to create a makefile according to an error that I was getting from make and make install. I'm not very experienced in building other people's projects/libraries from source, and the output I was getting from ./configure wasn't specific enough for me to figure out what was going on..

    So instead, I decided to grab libqxt-dev from (X)ubuntu 14.4 64bit's APT repo..

    I set up my QxtGlobalShortcut similarly to what's shown on libQxt's "documented example here": Unfortunately I got a compile error stating that Qxt's headers weren't found. After changing my #include from

    @#include <QxtGlobalShortcut>@


    @#include <qxt/QxtGui/QxtGlobalShortcut>@

    QtCreator was able to see the GlobalShortcut header, but then I got this error:

    @/usr/include/qxt/QxtGui/qxtglobalshortcut.h:28: error: qxtglobal.h: No such file or directory [#included within Qxt's own class header..]@

    So, I'm not sure what exactly is going wrong here. It seems that QtCreator is having a hard time with the include path for Qxt's headers, but I'm not sure how to go about fixing that. Here's what my project file looks like:

    @TEMPLATE = app

    QT += qml quick

    SOURCES += main.cpp

    RESOURCES += qml.qrc

    Additional import path used to resolve QML modules in Qt Creator's code model


    Default rules for deployment.


    HEADERS +=

    LIBS += -lSDL2

    CONFIG += qxt
    QXT += core gui@

    There might be something wrong with the version of libqxt-dev that I got from my distro's repo, and I've heard suggestions that it not have been compiled against Qt5.2.. So what can I do? Is there a version of Qxt that I can use with Qt5.2.1, or is there a 'native' Qt5 way of dealing with Global Shortcuts (which is the only thing I want Qxt for in the first place)..

Log in to reply