23 #include <QTreeWidget>
43 while ( ( parent = parent->parentWidget() ) )
47 if ( qobject_cast< QgsMessageBarItem * >( parent ) ||
48 qobject_cast< QgsFilterLineEdit * >( parent ) )
55 if ( qobject_cast<QLabel *>(
widget ) )
59 else if ( qobject_cast<QCheckBox *>(
widget ) )
63 else if ( qobject_cast<QAbstractButton *>(
widget ) )
67 else if ( qobject_cast<QGroupBox *>(
widget ) )
71 else if ( qobject_cast<QTreeView *>(
widget ) )
75 else if ( qobject_cast<QTableView *>(
widget ) )
97 mChangedStyle =
false;
100 if ( mInstalledFilter )
102 mWidget->removeEventFilter(
this );
103 mInstalledFilter =
false;
106 if ( !text.isEmpty() )
116 mWidget->installEventFilter(
this );
117 mInstalledFilter =
true;
130 if ( mInstalledFilter && event->type() == QEvent::Show && obj ==
mWidget )
132 mWidget->removeEventFilter(
this );
133 mInstalledFilter =
false;
142 QTimer::singleShot( 500,
this, [ = ]
148 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 table widgets.
A highlight widget for trees.