23 #include <QTreeWidget>
42 while ( ( parent = parent->parentWidget() ) )
46 if ( qobject_cast< QgsMessageBarItem * >( parent ) ||
47 qobject_cast< QgsFilterLineEdit * >( parent ) )
54 if ( qobject_cast<QLabel *>(
widget ) )
58 else if ( qobject_cast<QCheckBox *>(
widget ) )
62 else if ( qobject_cast<QAbstractButton *>(
widget ) )
66 else if ( qobject_cast<QGroupBox *>(
widget ) )
70 else if ( qobject_cast<QTreeView *>(
widget ) )
92 mChangedStyle =
false;
95 if ( mInstalledFilter )
97 mWidget->removeEventFilter(
this );
98 mInstalledFilter =
false;
101 if ( !text.isEmpty() )
111 mWidget->installEventFilter(
this );
112 mInstalledFilter =
true;
125 if ( mInstalledFilter && event->type() == QEvent::Show && obj ==
mWidget )
127 mWidget->removeEventFilter(
this );
128 mInstalledFilter =
false;
137 QTimer::singleShot( 500,
this, [ = ]
143 return QObject::eventFilter( obj, event );
A highlight widget for checkboxes.
A highlight widget for group boxes.
A highlight widget for labels.
A highlight widget for trees.