I never asked for you to write anything. I just explained how that property doesn't fix the problem, as I still need to break encapsulation by having a child window call a parent window's code for things to work.
Use signals and slots. You mean like in my first post's code sample which I said didn't work and drove me to post here? Or in my second post where I asked for an explanation as to why my initial signals/slots solution didn't work? Yeah, I can see how one could interpret that as PLEASE WRITE MY PROGRAM FOR ME!!!11.
I'll wait for people who are genuinely helpful to respond.
You can't do what you want without it.
No, you don't. The fact that you came up with a solution that does that doesn't mean it is the only solution.as I still need to break encapsulation by having a child window call a parent window's code for things to work.
No, because your code is incorrect for two reasons. One is that a hidden widget is not destroyed, so destroyed() will not be emitted and second is that even if it was destroyed, the property you claim is useless would cause the application to close before the other window would have a chance to reveal itself.Use signals and slots. You mean like in my first post's code sample which I said didn't work and drove me to post here?
Don't tempt me to delete what I have already written just out of pure curiosity to see how long you would be waiting after what you have written. You have been given a good answer and you responded "and how does that help?". It helps to solve the problem you stated you had:I'll wait for people who are genuinely helpful to respond.
You can also read the question you gave in the thread title and then ask yourself again "how does that help".Alas, closing MainWindow2 actually closes the entire application
And now you can wait for people who are "genuinely helpful to respond".
Bookmarks