QApplication::instance()->removeEventFilter( this );
}
+/*!
+ \brief Check if workarea contains any widgets.
+ \return \c true if area is null (havn't any child widgets)
+*/
+bool QtxWorkstackArea::isNull() const
+{
+ return myList.isEmpty();
+}
+
/*!
\brief Check if workarea contains visible widgets.
\return \c true if area is empty (all child widgets are removed or now shown)
myChild.remove( wid );
if ( del )
- {
delete child( wid );
- if ( myList.isEmpty() )
- delete this;
- else
- updateState();
- }
+
+ if ( isNull() )
+ deleteLater();
else
updateState();
}
QtxWorkstackArea( QWidget* );
virtual ~QtxWorkstackArea();
+ bool isNull() const;
bool isEmpty() const;
QWidget* insertWidget( QWidget*, const int = -1, Qt::WindowFlags = 0 );