Nevermind... Just find out...

Qt Code:
  1. void ChatWindow::separateWindowClicked()
  2. {
  3. if (this->mdiArea)
  4. {
  5. QMdiSubWindow *currentSub = this->mdiArea->activeSubWindow();
  6. if (currentSub){
  7. this->mdiArea->removeSubWindow(currentSub);
  8. currentSub->show();
  9. }
  10. }
  11. }
To copy to clipboard, switch view to plain text mode