163Fermer165
Kevin KoflerLe 09/08/2015 à 04:38
Au fait, pourquoi n'utilises-tu pas tout simplement la classe QxtGlobalShortcut? Même si Qxt n'est plus maintenu, la classe ne dépend pas du reste de la bibliothèque. Et sinon, au moins le code donne une idée comment faire.

En regardant le code:
https://bitbucket.org/libqxt/libqxt/src/696423b68972fc9edae318558b8ce26dc187cc40/src/widgets/qxtglobalshortcut.h?at=master
https://bitbucket.org/libqxt/libqxt/src/696423b68972fc9edae318558b8ce26dc187cc40/src/widgets/qxtglobalshortcut_p.h?at=master
https://bitbucket.org/libqxt/libqxt/src/696423b68972fc9edae318558b8ce26dc187cc40/src/widgets/qxtglobalshortcut.cpp?at=master
https://bitbucket.org/libqxt/libqxt/src/696423b68972fc9edae318558b8ce26dc187cc40/src/widgets/win/qxtglobalshortcut_win.cpp?at=master
ils font à peu près comme ta première tentative, mais ils utilisent QAbstractEventDispatcher::instance()->installNativeEventFilter(this); pour installer le filtre. (C'est la solution à ton problème du ./160.)