forked from qt-creator/qt-creator
Change GraphicsView settings to be more in line with Qml
Task-Number: BAUHAUS-567 Reviewed-by: kkoehne
This commit is contained in:
@@ -43,8 +43,9 @@ FormEditorGraphicsView::FormEditorGraphicsView(QWidget *parent) :
|
|||||||
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
||||||
setResizeAnchor(QGraphicsView::AnchorViewCenter);
|
setResizeAnchor(QGraphicsView::AnchorViewCenter);
|
||||||
// setCacheMode(QGraphicsView::CacheNone);
|
// setCacheMode(QGraphicsView::CacheNone);
|
||||||
setCacheMode(QGraphicsView::CacheBackground);
|
setCacheMode(QGraphicsView::CacheBackground);
|
||||||
setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
|
setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
|
||||||
|
setOptimizationFlags(QGraphicsView::DontSavePainterState);
|
||||||
// setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
|
// setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
|
||||||
setRenderHint(QPainter::Antialiasing, false);
|
setRenderHint(QPainter::Antialiasing, false);
|
||||||
|
|
||||||
|
@@ -67,6 +67,7 @@ FormEditorScene::FormEditorScene(FormEditorWidget *view, FormEditorView *editorV
|
|||||||
m_formLayerItem->setZValue(0.0);
|
m_formLayerItem->setZValue(0.0);
|
||||||
m_formLayerItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
|
m_formLayerItem->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
|
||||||
view->setScene(this);
|
view->setScene(this);
|
||||||
|
setItemIndexMethod(QGraphicsScene::NoIndex);
|
||||||
|
|
||||||
// setItemIndexMethod(QGraphicsScene::NoIndex);
|
// setItemIndexMethod(QGraphicsScene::NoIndex);
|
||||||
}
|
}
|
||||||
|
@@ -95,8 +95,10 @@ NodeInstanceView::NodeInstanceView(QObject *parent)
|
|||||||
m_blockStatePropertyChanges(false)
|
m_blockStatePropertyChanges(false)
|
||||||
{
|
{
|
||||||
m_graphicsView->setAttribute(Qt::WA_DontShowOnScreen, true);
|
m_graphicsView->setAttribute(Qt::WA_DontShowOnScreen, true);
|
||||||
m_graphicsView->setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
|
m_graphicsView->setOptimizationFlags(QGraphicsView::DontSavePainterState);
|
||||||
|
m_graphicsView->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
|
||||||
m_graphicsView->setScene(new QGraphicsScene(m_graphicsView.data()));
|
m_graphicsView->setScene(new QGraphicsScene(m_graphicsView.data()));
|
||||||
|
m_graphicsView->scene()->setItemIndexMethod(QGraphicsScene::NoIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user