24 : QDockWidget( parent, flags )
26 connect(
this, &QDockWidget::visibilityChanged,
this, &QgsDockWidget::handleVisibilityChanged );
30 : QDockWidget( title, parent, flags )
32 connect(
this, &QDockWidget::visibilityChanged,
this, &QgsDockWidget::handleVisibilityChanged );
44 if ( !mVisibleAndActive )
58 return mVisibleAndActive;
64 if ( !mAction->isCheckable() )
65 mAction->setCheckable(
true );
67 connect( mAction, &QAction::toggled,
this, [ = ](
bool visible )
71 connect(
this, &QgsDockWidget::visibilityChanged, mAction, [ = ](
bool visible )
73 mAction->setChecked( visible );
87 QDockWidget::closeEvent( e );
95 QDockWidget::showEvent( e );
98 void QgsDockWidget::handleVisibilityChanged(
bool visible )
100 mVisibleAndActive = visible;