m_firstScene
->addRect
(0,
10,
10,
10,
QPen(Qt
::black),
QBrush(Qt
::gray));
m_secondView->setScene(m_secondScene);
m_firstView->setScene(m_firstScene);
m_secondView->setAlignment(Qt::AlignTop|Qt::AlignLeft);
m_firstView->setAlignment(Qt::AlignTop|Qt::AlignLeft);
m_horizontalSplitter->addWidget(m_firstView);
m_horizontalSplitter->addWidget(m_secondView);
m_horizontalSplitter->setOrientation(Qt::Horizontal);
m_horizontalSplitter->setStretchFactor(0,1);
m_horizontalSplitter->setStretchFactor(1,5);
this->setWidget(m_horizontalSplitter);
m_firstView = new QGraphicsView(this);
m_secondView = new QGraphicsView(this);
m_firstScene = new QGraphicsScene(0,0,100,100,m_firstView);
m_secondScene = new QGraphicsScene(m_secondView);
m_firstScene->addRect(0,10,10, 10, QPen(Qt::black), QBrush(Qt::gray));
m_secondView->setScene(m_secondScene);
m_firstView->setScene(m_firstScene);
m_secondView->setAlignment(Qt::AlignTop|Qt::AlignLeft);
m_firstView->setAlignment(Qt::AlignTop|Qt::AlignLeft);
m_horizontalSplitter = new QSplitter(this);
m_horizontalSplitter->addWidget(m_firstView);
m_horizontalSplitter->addWidget(m_secondView);
m_horizontalSplitter->setOrientation(Qt::Horizontal);
m_horizontalSplitter->setStretchFactor(0,1);
m_horizontalSplitter->setStretchFactor(1,5);
this->setWidget(m_horizontalSplitter);
To copy to clipboard, switch view to plain text mode
Bookmarks