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.
Q_CHECK_PTR( m_dockWin );
Q_CHECK_PTR( m_toolbox );
m_dockWin->setWidget( m_toolbox );
m_dockWin->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
m_dockWin = new QDockWidget("test");
Q_CHECK_PTR( m_dockWin );
m_toolbox = new QToolBox( this );
Q_CHECK_PTR( m_toolbox );
m_dockWin->setWidget( m_toolbox );
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:
Kalzium::Kalzium()
: KMainWindow( 0, "Kalzium" )
{
Kalzium::Kalzium()
: KMainWindow( 0, "Kalzium" )
{
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?
Bookmarks