[PyKDE] Newbie question on QWidget.focusOutEvent

Giovanni Bajo rasky at develer.com
Fri Sep 23 09:12:05 BST 2005


Volker Lenhardt <volker.lenhardt at uni-due.de> wrote:

> But I don't get it to work. I try to open a message box on focus
> change, but it never comes. Focus changes undisturbed. A snippet of
> my script:

Are you sure you are giving focus to the Combo box? Use the TAB key to give it
real focus. If you check, QComboBox' focus policy is KeyFocus, so it only gets
the focus through key presses, *not* mouse actions. If you want to change this,
use setFocusPolicy(QWidget.StrongFocus) so that it can get the focus through
either mouse or keyboard.

Giovanni Bajo




More information about the PyQt mailing list