A few additional comments from my side: * Global shortcuts need to be registered with the windowing system. That implies that we'll need an API in Lighthouse (QPlatform* classes). The default implementation could simply register the shortcut as an application global shortcut as the best fallback.
* The QShortcut class will stay in libQtWidgets. But QShortcutMap is in Gui (pending a few changes I have open in gerrit), and should be the integration point. It's private API, but I'd like to add a QML object for registering shortcuts on top of it to complement the QWidget based QShortcut. * As someone already noted, we'll most likely need a slightly different API for registering global shortcuts than the existing one, as the registration can fail if another app has already grabbed that shortcut. One option, could be to clean up the existing QShortcutMap API, add code for global shortcuts to it and make it accessible through QGuiApplication. But I'm not yet sure this would be the best option. Cheers, Lars On 10/22/11 1:08 AM, "ext Olivier Goffart" <[email protected]> wrote: >On Friday 21 October 2011 23:50:29 Mark wrote: > >> I'm kinda confused and don't know if i get you or not :p > >That's fine, i'm confused too, i don't know if i get myself. > >> Are you suggesting to: >> - have a client app (the one KDE has for defining global key shortcuts) >> - have the Qt app (the app itself so i guess you can call this >>"server") to >> "define" which keys can be set as global keys..? >> >> Am i interpreting it correctly? > > >Basically, but i meant it the other way. >The Qt application is the client. > >> Right now i make a todo application and i want a new window to pop up >>when i >> press the CTRL + ALT + T combination (that stands for creating a new >>task >> in my app). And i really just want to do that in pure Qt and that app >>only, >> not by having a client - server model like described above.. > >Yes of course. > >> >> On the other hand, if Linux, Windows and Mac all had some app like KDE's >> global shortcut manager then i would certainly like to use it. But >>that's >> not the case for at least Windows. KDE has it, don't know for mac. > >Yes, if Windows don't have it, then it is not Qt's scope to implement it. >and >you can just register your shortcut as global just like that. > >We just need to integrate into existing infrastructure. > >_______________________________________________ >Qt5-feedback mailing list >[email protected] >http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback _______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
