代码如下:
this->mainSplitter = new QSplitter( this );
this->mainSplitter->setOrientation(Qt::Horizontal);
this->setCentralWidget(this->mainSplitter);
//------------------------------------------
QFrame* frame1 = new QFrame(this);
frame1->setFrameStyle(QFrame::Box);
this->mainSplitter->addWidget(frame1);
//------------------------------------------
QSplitter* splitter1 = new QSplitter(this);
splitter1->setOrientation(Qt::Vertical);
QFrame* frame2 = new QFrame(this);
frame2->setFrameStyle(QFrame::Box);
QFrame* frame3 = new QFrame(this);
frame3->setFrameStyle(QFrame::Box);
splitter1->addWidget(frame2);
splitter1->addWidget(frame3);
//------------------------------------------
this->mainSplitter->addWidget(splitter1);
this->mainSplitter = new QSplitter( this );
this->mainSplitter->setOrientation(Qt::Horizontal);
this->setCentralWidget(this->mainSplitter);
//------------------------------------------
QFrame* frame1 = new QFrame(this);
frame1->setFrameStyle(QFrame::Box);
this->mainSplitter->addWidget(frame1);
//------------------------------------------
QSplitter* splitter1 = new QSplitter(this);
splitter1->setOrientation(Qt::Vertical);
QFrame* frame2 = new QFrame(this);
frame2->setFrameStyle(QFrame::Box);
QFrame* frame3 = new QFrame(this);
frame3->setFrameStyle(QFrame::Box);
splitter1->addWidget(frame2);
splitter1->addWidget(frame3);
//------------------------------------------
this->mainSplitter->addWidget(splitter1);