This is the current code, still crashing. As soon as I make the m_dockWin a child of "this" it is *in* the mainwindow. So that cannot be right.

Qt Code:
  1. m_dockWin = new QDockWidget("test");
  2. Q_CHECK_PTR( m_dockWin );
  3.  
  4. m_toolbox = new QToolBox( this );
  5. Q_CHECK_PTR( m_toolbox );
  6.  
  7. m_dockWin->setWidget( m_toolbox );
  8. m_dockWin->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
To copy to clipboard, switch view to plain text mode 

I noticed this in the shell when executing Kalzium
QLayout::addChildWidget: QToolBox "" in wrong parent; moved to correct parent
class Kalzium is:

Qt Code:
  1. Kalzium::Kalzium()
  2. : KMainWindow( 0, "Kalzium" )
  3. {
To copy to clipboard, switch view to plain text mode 

I don't know the check-pointer-macro, but I don't see any information in the shell. Is this supposed to help in gdb?