Hi,

My application has a QWorkspace, and I am adding to it a tab bar, to look like a QTabWidget. I am trying to detect when a window is closed, to update the window list. I am using this code:

Qt Code:
  1. connect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(windowDeleted2(QObject*)));
  2.  
  3. ...
  4. void qmdiWorkspace::windowDeleted( QObject *o )
  5. {
  6. int windowNumber = workspace->windowList().lastIndexOf(dynamic_cast<QWidget*>(o));
  7. if (windowNumber!=-1)
  8. tabBar->removeTab( windowNumber );
  9. }
To copy to clipboard, switch view to plain text mode 

Now that function is never called. It seems that pressing the X on the windows, hides then and does not close them. Does anyone have an idea about a possible fix? another implementation of this feature?

I also read this thread, but I found no solution to my problem.
http://www.qtcentre.org/forum/f-qt-p...ssed-3144.html