23 #include <QTreeWidget> 41 while ( ( parent = parent->parentWidget() ) )
44 if ( qobject_cast< QgsMessageBarItem * >( parent ) )
51 if ( qobject_cast<QLabel *>( widget ) )
55 else if ( qobject_cast<QCheckBox *>( widget ) )
59 else if ( qobject_cast<QAbstractButton *>( widget ) )
63 else if ( qobject_cast<QGroupBox *>( widget ) )
67 else if ( qobject_cast<QTreeView *>( widget ) )
89 mChangedStyle =
false;
92 if ( mInstalledFilter )
94 mWidget->removeEventFilter(
this );
95 mInstalledFilter =
false;
98 if ( !text.isEmpty() )
108 mWidget->installEventFilter(
this );
109 mInstalledFilter =
true;
122 if ( mInstalledFilter && event->type() == QEvent::Show && obj ==
mWidget )
124 mWidget->removeEventFilter(
this );
125 mInstalledFilter =
false;
134 QTimer::singleShot( 500,
this, [ = ]
140 return QObject::eventFilter( obj, event );
A highlight widget for checkboxes.
A highlight widget for trees.
A highlight widget for labels.
A highlight widget for group boxes.