Just thought I'd post to say I've fixed this, problem was, I was currently using Qt4.2.3 and using QWorkspace, I am now using Qt4.3 which now I changed to QMdiArea and now changed how I create my windows by now using QMdiSubWindow and setting my widget 'into' this, snippet shown below:
m_pCanTree = new CanTree( this );
m_pCanTreeWindow = new QMdiSubWindow;
m_pCanTreeWindow->setWidget( m_pCanTree );
m_pCanTreeWindow->setAttribute( Qt::WA_DeleteOnClose );
m_pCanTree = new CanTree( this );
m_pCanTreeWindow = new QMdiSubWindow;
m_pCanTreeWindow->setWidget( m_pCanTree );
m_pCanTreeWindow->setAttribute( Qt::WA_DeleteOnClose );
To copy to clipboard, switch view to plain text mode
and now my close function is just simply :
m_pworkspace->removeSubWindow( m_pCanTreeWindow );
m_pworkspace->removeSubWindow( m_pCanTreeWindow );
To copy to clipboard, switch view to plain text mode
Regards,
Steve
Bookmarks