[Qt-interest] System-wide shortcut (hotkey)
Anthony Serdyukov
uksus70 at gmail.com
Tue Jan 13 08:20:45 CET 2009
Thanks, I'm looking at QAbstractEventDispatcher too, and that is why.
In the documentation for QCoreApplication::winEventFilter I have found
the following:
<cite>
It is only directly addressed messages that are filtered. To handle
system wide messages, such as messages from a registered hot key, you
need to install an event filter on the event dispatcher, which is
returned from QAbstractEventDispatcher::instance().
</cite>
So, what kind of hot keys are mentioned here... don't know. And how to
register it properly?
2009/1/13 R. Reucher <rene.reucher at batcom-it.net>:
> On Tue January 13 2009 06:48:15 Anthony Serdyukov wrote:
>> Good day.
>>
>> I need to set system-wide hotkey and perform some action when it is fired.
>> The only one discussion I have found is here:
>> http://lists.trolltech.com/qt-interest/2007-07/thread00221-0.html
>> But unfortunately, there is no solution there.
>>
>> Qt 4.4.3, platform is Windows.
> As far as I can tell, QAction doesn't support that natively - the
> highest "level" of the shortcut context is on application level.
>
> The only solution I can think of is to use QAbstractEventDispatcher and
> install an event filter function that does the job... but I've never tried
> it, so I can't tell if what you are aiming to achieve is really possible this
> way.
>
> There may also be platform dependent ways, of course...
>
> HTH, René
> --
> René Reucher
> rene.reucher at batcom-it.net
> http://www.batcom-it.net/
>
> "Biology is the only science in which multiplication means the same
> thing as division."
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
Regards,
Anthony
More information about the Qt-interest-old
mailing list