PDA

View Full Version : Boss-key?



liuyanghejerry
17th August 2010, 11:00
I'm trying to make a boss key for my program, which is a global hot key used for activeing or hiding all windows of my program, whether the program is active.

I searched about this kind of hot key, it needs WIN32 API RegisterHotKey() .

But the problem is that my program may have more than one windows at one time, and how can I make a function to handle these windows? I cannot write RegisterHotKey() to each window.

Anyway,thanks...

The Storm
17th August 2010, 15:07
For cross-platform hot key: http://doc.libqxt.org/0.6.0/qxtglobalshortcut.html

For your second question: QApplication::topLevelWidgets()

liuyanghejerry
18th August 2010, 11:52
For cross-platform hot key: http://doc.libqxt.org/0.6.0/qxtglobalshortcut.html

For your second question: QApplication::topLevelWidgets()

Wow, what a cool extension it is!

Thanks, really^^