L
L
Loligan2015-02-20 20:31:08
Qt
Loligan, 2015-02-20 20:31:08

Boolean option to close a QT C++ GUI form?

Here in the dialogue is easier. There for example
DIalog dg;
if (dg.exec())
{
...
}
And how to find out if the window is closed in a simple mainwindow?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly, 2015-02-20
@vt4a2h

Every widget has a close() slot that returns true if the widget is successfully closed.
Qt has excellent documentation qt-project.org/doc/qt-4.8/qwidget.html#close.
First, look there, then in Google, then write a question. It's so simple)
And Qt, not QT.

A
Armenian Radio, 2015-02-20
@gbg

Catch void MainWindow::closeEvent(QCloseEvent *event), set your status variable as needed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question