Creating exit button for a window
Solved
General and Desktop
-
Hello.
I created two windows. One shown, the other hidden.
A button on window 1 to show window 2.I'd like to make a "hide" button on window 2 for window 2.
I connected the "hide" button like this:
QObject::connect(closeBtn, SIGNAL(clicked()), qApp, SLOT(quit()));
It quits totally the app, but I want window 1 to stay open.
Isn't there something similar to close a single window?
Then I tried using win2.hide(); within a slot but it says "'win2' was not declared in this scope", even all .h files included.
Can anybody point me in the right direction?