I read http://doc.qt.nokia.com/latest/mainw...ckwidgets.html and would like to create an UI exactly like it.
Except:
1. centralWidget “Letter†put on right hand side, 2 DockWidgets “Customers†and “Paragraphs†put on left hand side.
2. There is a bottom DockWidget.
However, the following code put “Customers†on left hand side, “Letter†on the central, “Paragraphs†on the right hand side.
How should I change the code to fix the layout problem?
frame->setLayout( layout );
layout->addWidget( &m_Main );
setCentralWidget( frame );
m_A = new A( this );
addDockWidget( Qt::LeftDockWidgetArea, m_A );
m_B = new B( this );
addDockWidget( Qt::LeftDockWidgetArea, m_B );
m_C = new C( this );
addDockWidget( Qt::BottomDockWidgetArea, m_C );
QFrame *frame = new QFrame( this );
QLayout *layout = new QVBoxLayout( frame );
frame->setLayout( layout );
layout->addWidget( &m_Main );
setCentralWidget( frame );
m_A = new A( this );
addDockWidget( Qt::LeftDockWidgetArea, m_A );
m_B = new B( this );
addDockWidget( Qt::LeftDockWidgetArea, m_B );
m_C = new C( this );
addDockWidget( Qt::BottomDockWidgetArea, m_C );
To copy to clipboard, switch view to plain text mode
Bookmarks