[PySide] how to control tab focus between QAction and QWidgetAction's children?

Frank Rueter | OHUfx frank at ohufx.com
Wed Dec 4 22:54:29 CET 2013


Hi all,

I am struggling to control the focus shift (via the tab key) inside a 
QMenu. The menu has one QAction and one QWidgetAction. The latter has 
three child widgets (two QLineEdit and one QPushButton widget).
When the cursor is inside of one of the child widgets, the tab key does 
not work as expected to move to the next child widget, instead the QMenu 
takes ownership of the key stroke and shifts focus to the QAction.

How can I make the QWidgetAction take precedence over the QMenu when the 
tab key is hit?

I also posted this on SO yesterday with example code but so far no 
workable solutions:

http://stackoverflow.com/questions/20365663/how-to-control-focus-of-qwidgetactions-child-widgets/20366913?iemail=1&noredirect=1#20366913


Cheers,
frank





More information about the PySide mailing list