문제

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.

도움이 되었습니까?

해결책

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."

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top