Maybe it will be enough if you just save a pointer to the current active window somewhere?
Maybe it will be enough if you just save a pointer to the current active window somewhere?
Yes, thanks for the comments, I did this but thought it would be nice to have a signal/slot available....
Another questions:
What about close; if someone closes a MDI child does it send out an event closeAcitveWindow()? Or how do you realize if something is closed?
I know I can go through the list of windows but really would like to have a QWorkspace send out a signal telling me that something was closed!
So I finally found the way to do this and in retrospect I can't see why I didn't see this before. But what I did is in the QWidget that I add to the workspace I overwrote the closeEvent and then sent out a signal saying that I was closing. Then I connected that with my mainwindow to get the event. It wasn't the ideal solution but it will work.
One simple solution could be to install an event filter on all MDI childs and detect the close event that way.Originally Posted by fellobo
Agreed. QWorkspace could provide more signals, indeed..Originally Posted by fellobo
J-P Nurmi
fellobo (28th April 2006)
Bookmarks