// in header of your form
protected:
// in constructor your form
installEventFilter(yourCmb->listBox());
// then
{
if ( e
->type
() == QEvent::Show ) {
yourMethod();
return TRUE; // eat event
} else
{
// standard event processing
return FALSE;
}
}
// in header of your form
protected:
bool eventFilter( QObject *o, QEvent *e );
// in constructor your form
installEventFilter(yourCmb->listBox());
// then
bool yourForm::eventFilter( QObject *o, QEvent *e )
{
if ( e->type() == QEvent::Show )
{
yourMethod();
return TRUE; // eat event
} else
{
// standard event processing
return FALSE;
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks