K
K
kolomiec_artiom2018-05-07 13:41:28
Qt
kolomiec_artiom, 2018-05-07 13:41:28

How to close all windows in C++ and QT?

Good afternoon!
There is a main window in QtCreator: MainWindow
I need that: if the main window was closed, then all the others would be closed.

Side windows are created with:
label->show();
Thanks for the reply!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ighor July, 2018-05-07
@kolomiec_artiom

Make a signal in MainWindow::onWindowClosed and call it in MainWindow::closeEvent(QCloseEvent *event)
Connect the signal to all separate windows in hide() or close()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question