[Qt-interest] Uncloseable QMdiSubWindow?
Wm. G. Urquhart
wgu at wurquhart.co.uk
Tue May 11 09:15:58 CEST 2010
On 10/05/2010 20:58, Rui Maciel wrote:
> Is there a way to configure a QMdiSubWindow to make it impossible to be closed by the user?
>
Hi,
This is what I use.
In the Window's .h file:
protected:
void closeEvent(QCloseEvent * event) ;
and of course in the source
void MySubWindow::closeEvent(QCloseEvent * event)
{
event->ignore() ;
}
I actually have logic in the close event to allow closure of the window
given appropriate conditions but removed here for brevity.
HTH
--
William
More information about the Qt-interest-old
mailing list