Is it possible to keep a QWidget
open after close button clicked? Suppose that widget is main widget. i.e. not child of another widget.
Asked
Active
Viewed 3,789 times
8

László Papp
- 51,870
- 39
- 111
- 135

Hesam Qodsi
- 1,569
- 3
- 25
- 38
1 Answers
12
I would try to:
void Widget::closeEvent(QCloseEvent *event)
{
[..]
event->ignore();
}
As documentation say:
"For example, you can prevent the window from closing by calling ignore() on all events."

vahancho
- 20,808
- 3
- 47
- 55