I don't know how to implement sizeHint() in QDocWidget?
I have written the following code:
m_pWorkspaceDockWidget
= new QDockWidget( "Workspace Explorer",
this );
m_pWorkspaceDockWidget->setWhatsThis(tr("<b>Workspace Explorer</b> <br>It displays all the items in the workspace\
that you opened.</br> "));
m_pWorkspaceDockWidget
->setFeatures
( QDockWidget::AllDockWidgetFeatures );
addDockWidget( Qt::LeftDockWidgetArea, m_pWorkspaceDockWidget );
m_pWorkspaceDockWidget
->setBackgroundRole
( QPalette::Button );
m_pWorkspaceDockWidget->setMinimumHeight( 400 );
//m_pWorkspaceDockWidget->setMaximumWidth(150 );
m_pWorkspaceDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
m_pWorkspaceDockWidget->adjustSize();
m_pWorkspaceDockWidget = new QDockWidget( "Workspace Explorer", this );
m_pWorkspaceDockWidget->setWhatsThis(tr("<b>Workspace Explorer</b> <br>It displays all the items in the workspace\
that you opened.</br> "));
m_pWorkspaceDockWidget->setFeatures( QDockWidget::AllDockWidgetFeatures );
addDockWidget( Qt::LeftDockWidgetArea, m_pWorkspaceDockWidget );
m_pWorkspaceDockWidget->setBackgroundRole( QPalette::Button );
m_pWorkspaceDockWidget->setMinimumHeight( 400 );
//m_pWorkspaceDockWidget->setMaximumWidth(150 );
m_pWorkspaceDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
m_pWorkspaceDockWidget->adjustSize();
To copy to clipboard, switch view to plain text mode
Bookmarks