Yes: QWidget::setHidden().
Edit: Ehm, forget about it, misread
Edit2: And now the answer: There is no signal but an event: QWidget::showEvent()/QEvent::Show/QEvent::Hide
Yes: QWidget::setHidden().
Edit: Ehm, forget about it, misread
Edit2: And now the answer: There is no signal but an event: QWidget::showEvent()/QEvent::Show/QEvent::Hide
Last edited by Lykurg; 17th March 2010 at 16:35.
So the window's parent (say my QMainWindow's subclass) could intercept this event and change the action accordingly, provided that the main windows is somehow the parent of the windows whose visibility we want to track. Is that correct?
Your main window mustn't be the parent. I can think of two options: a) install an event filter on your widgets you want to watch or create an abstract class which must be inherited by your windows. There catch the show and hide event and emit custom signals. Then you can use signal and slots as you are used to.
Bookmarks