[Qt-interest] duplicated shortcut problem

Deepak Chandran dchandran1 at tinkercell.com
Wed Feb 11 00:29:03 CET 2009


What do I need to do in order to make common shortcuts (such as Ctrl+O,
Ctrl+S, etc.) to be available on the main window but also be available on a
child widget. The shortcuts of the child widget should override the main
window shortcuts when it has focus. I tried different values in
setShortcutContext in QAction, but anything other than Qt::WindowShortcut
causes none of the shortcuts to work.
The shortcuts in QTextEdit, such as Ctrl+Z, Ctrl+C, Ctrl+V, do override the
main window shortcuts. How does it do that? How do I make my widgets do the
same?
I am thinking that it has something to do with who is the parent of my
action objects maybe. I am sure someone here has dealt with this issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090210/62e6b351/attachment.html 


More information about the Qt-interest-old mailing list