[Development] QtQuickControls Action keyboard shortcuts and keyPressEvent (TextField)
Ola Røer Thorsen
ola at silentwings.no
Mon Aug 12 12:12:39 CEST 2013
Thanks for the feedback. The bug report is here:
https://bugreports.qt-project.org/browse/QTBUG-32928
Best regards,
Ola
Den 2013-08-12 11:02, skrev Frederik Gladhorn:
> Mandag 12. august 2013 10.54.50 skrev Ola Røer Thorsen:
>> Hello,
>>
>> I'm writing a specialized playback application, based on Qt 5.1. The GUI
>> is based on QtQuick, and uses the QuickControls. The root window is a
>> QQuickWindow, and the base item in the Quick scene is an ApplicationWindow.
>>
>> I use Action items with keyboard shortcuts defined. This works, but it
>> seems like an Action gets the keyboard event before the Quick items
>> receive them. This means that if I have a TextField with active focus,
>> it will not receive any keyboard key press events if such a key is
>> already defined in an Action.
>>
>> I tried the same setup in a QWidget-based application. There it is no
>> problem - I add a QAction to QApplication with a shortcut - it is
>> triggered as long as it's not accepted by a text field first.
>>
>> Example: spacebar is shortcut for a play/pause toggle action. This means
>> space cannot be used in a TextField with active focus. It will toggle
>> play/pause while you type, and no space appears in the text. Please
>> don't tell me I will have to add Ctrl+ to all the shortcuts...
>>
>> Is this intended behavior in QtQuick? Shouldn't the item with active
>> focus get the key press BEFORE any Action?
> Yes, please file an issue on bugreports.qt-project.org .
> The text control should have a chance to do a "shortcut override".
>
> Greetings
> Frederik
>
>
>> Thanks,
>> Ola
>>
>> _______________________________________________
>> Development mailing list
>> Development at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/development
More information about the Development
mailing list