I want to open a new form, close it an reopen it.

However, when I reopen it, all changed stuff still is there (like text in a label or something like that). Now I am not really concerned with these trivial visual ... leftovers, but more with the inner working. Will a timer keep running after i close this window? Keep updating labels with pictures? (I don't really want that by default)

So what I want is : I open a new form, after that form is closed, it will be destroyed an renewed. This would result in a fresh screen ready to start.

I know it is not that crazy. In VB.NET it looks like this:

// the initialization :
Qt Code:
  1. Private WithEvents _frmLogging As frmLogging
To copy to clipboard, switch view to plain text mode 
//opening the form, by pressing a button or something
Qt Code:
  1. _frmLogging = New frmLogging
  2. _frmLogging.Show()
To copy to clipboard, switch view to plain text mode 
//deleting it when it is closed :
Qt Code:
  1. Private Sub CatchClosingLog(sender As Object, e As EventArgs) Handles _frmLogging.FormClosed
  2. _frmLogging.Dispose()
  3. _frmLogging = Nothing
  4. End Sub
To copy to clipboard, switch view to plain text mode 
I want to replicate this in Qt . frmMain is my Qmainwindow and I want to open frmTest which is represented by oTestFrame.
Qt Code:
  1. void frmMain::on_btnOpenNew_clicked()
  2. {
  3. oTestFrame.show();
  4. __hook(&frmTest::FormClosed, &oTestFrame, &frmMain::OnCloseSecondTry); //Here I create an event. This allows me to run code in [I]frmMain[/I] after [I]frmTest[/I] is closed
  5. }
To copy to clipboard, switch view to plain text mode 
When oTestFrame is closed, OnCloseSecondTry is executed. That is were it all goes wrong.
Qt Code:
  1. void frmMain::OnCloseSecondTry()
  2. {
  3. __unhook(&frmTest::FormClosed,& oTestFrame, &frmMain::OnCloseSecondTry); //unhook event, just good practice, I don't really think it will matter after the object is destroyed (Am I wrong?)
  4. oTestFrame.~frmTest();
  5. frmTest oTemp;
  6. oTestFrame = &oTemp;
  7. }
To copy to clipboard, switch view to plain text mode 
The important variables are declared in frmMain.h :
Qt Code:
  1. ...
  2. private:
  3. frmTest oTestFrame;
  4. void OnCloseSecondTry();
  5. ...
To copy to clipboard, switch view to plain text mode 
I destroy oTestFrame. But I can not insert a fresh frmTest object in oTestFrame.
I read somewhere you could not store a Qwidget in a Qwidget. Is that true?
How can i get this to work? Any suggestions welcome :P