[Qt-interest] Catching focus events on QTabWidget

Philippe Fremy phil at freehackers.org
Tue Mar 17 09:09:16 CET 2009


Hi,

I am trying to catch focusIn/Out events on QTabWidget but it does not
work. I wrote a small program to double-check, and it works for QWidget
or QTextEdit, but not for QTabWidget (as the main widget).

Nothing in the Qt doc says that QTabWidget overrides focusEvent in a way
that they are not catchable, so it looks like a bug to me.

Attached is the source code of my small example.

Any ideas ?

cheers,

Philippe
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.cpp
Url: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090317/2cdcd82e/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mywidget.cpp
Url: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090317/2cdcd82e/attachment-0001.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mywidget.h
Url: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090317/2cdcd82e/attachment.h 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: focus_example.pro
Url: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090317/2cdcd82e/attachment-0002.pl 


More information about the Qt-interest-old mailing list