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?

Qt Code:
  1. QFrame *frame = new QFrame( this );
  2. QLayout *layout = new QVBoxLayout( frame );
  3. frame->setLayout( layout );
  4. layout->addWidget( &m_Main );
  5. setCentralWidget( frame );
  6.  
  7. m_A = new A( this );
  8. addDockWidget( Qt::LeftDockWidgetArea, m_A );
  9.  
  10. m_B = new B( this );
  11. addDockWidget( Qt::LeftDockWidgetArea, m_B );
  12.  
  13. m_C = new C( this );
  14. addDockWidget( Qt::BottomDockWidgetArea, m_C );
To copy to clipboard, switch view to plain text mode