[Interest] Standard QKeySequence for "Fullscreen"
BRM
bm_witness at yahoo.com
Mon Apr 23 22:53:02 CEST 2012
> From: Andreas Pakulat <apaku at gmx.de>
>On 21.04.12 11:23:19, Rick Stockton wrote:
>> On 04/21/2012 05:53 AM, Till Oliver Knoll wrote:
>> > .... As a proof of concept, a naive "user settings aware" Qt implementation could be
>> > - When initialising QApplication and
>> > - When we detect running on KDE
>> > - Dynamically link to "KDE Core" library (if not already done so anyway)
>> > - For each standard QKeySequence:
>> > * Instantiate the corresponding KAction via KStandardAction
>> > * Get the shortcut (QKeySequence) set for the KAction and initialise the standard QKeySequence in Qt with it
>> > Off course instantiating n objects just for getting a shortcut is totally nonsense, let alone that linking against a library (KDE Core) which on its turn depends on Qt itself is not such a brilliant idea...
>> >
>> > Heck, but via clever plugin mechanisms Qt also manages to call the standard KDE file dialog today, so I'm pretty sure there is a way to query the KDE shortcut settings, too, in some way :)
>>
>> I wouldn't want to do this, even as a 'POC'. Linking Qt's keyboard
>> shortcuts to KDE would be a fundamental error WRT the layered design and
>> dependencies standards of both Projects. (Keyboard input is pretty
>> fundamental.)
>
>Actually adjusting the standard shortcuts in Qt to the KDE settings of
>the users DE is the correct thing and really wanted. I wouldn't want to
>have to learn two sets of shortcuts for basic tasks such as
>Copy/Cut/Paste etc. Its good if Qt can override shortcuts for QTextEdit,
>QLineEdit and Co automatically to the platform it runs on.
----- Original Message -----
> From: Stephen Kelly <steveire at gmail.com>
...
> Global shortcuts is the biggest problem we still have to find a solution
> for, so if you contribute something to Qt 5 for that, it would be helpful.
>
> It might even makes sense to create a QPA abstraction for it. QAction is
> 'done' in Qt 5, so hopefully we'll see some new abstraction for
> actions at some point in Qt 5.x anyway.
Perhaps the following [1]:
- Have a QPA class that can manage the conversions
- Programmers can register their QActions against the QPA class to update the short-cuts to match the platform
If programmers want to ignore the platform default short-cuts, they can by not using that functionality.
If they do, then they can map their QActions into the QPA class for what is supported.
This could even allow dynamic update - e.g. the user changes the system settings while the application is running - if the
QPA class had the ability to monitor for changes to the settings.
$0.02
Ben
[1]http://lists.qt-project.org/pipermail/interest/2012-April/001798.html
More information about the Interest
mailing list