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

Frank Rueter | OHUfx frank at ohufx.com
Thu Dec 5 20:51:55 CET 2013

looks like the re-implementing the QMenu's virtual function 
focusNextPrevChild() to behave like in a standard QWidget is the winner 
here (see SO for details)

On 05/12/13 10:54, Frank Rueter | OHUfx wrote:
> 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
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside

More information about the PySide mailing list