summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsview.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-04-24 16:43:14 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-04-24 16:43:14 +0300
commit29400a683f96867133b28299c0d0bd6bcf40df35 (patch)
treeb616dfb91ce111d61a34a67b28069561306575da /src/widgets/graphicsview/qgraphicsview.cpp
parent42e4ae042a4c86e58bcb8b6d2d59ba4a988285b4 (diff)
parent9c60c8b122e5eb74fe74e11b929c30aa19ec0dd3 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.10' into tqtc/lts-5.15-opensourcev5.15.10-lts-lgpl
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsview.cpp')
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index 90bddf6e84..e1ff2c932e 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -107,7 +107,7 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
the events and reacts to them. For example, if you click on a selectable
item, the item will typically let the scene know that it has been
selected, and it will also redraw itself to display a selection
- rectangle. Similiary, if you click and drag the mouse to move a movable
+ rectangle. Similarly, if you click and drag the mouse to move a movable
item, it's the item that handles the mouse moves and moves itself. Item
interaction is enabled by default, and you can toggle it by calling
setInteractive().
@@ -3773,7 +3773,12 @@ void QGraphicsView::drawBackground(QPainter *painter, const QRectF &rect)
return;
}
+ const bool wasAa = painter->testRenderHint(QPainter::Antialiasing);
+ if (wasAa)
+ painter->setRenderHints(QPainter::Antialiasing, false);
painter->fillRect(rect, d->backgroundBrush);
+ if (wasAa)
+ painter->setRenderHints(QPainter::Antialiasing, true);
}
/*!
@@ -3877,7 +3882,7 @@ bool QGraphicsView::isTransformed() const
otherwise, \a matrix \e replaces the current matrix. \a combine is false
by default.
- The transformation matrix tranforms the scene into view coordinates. Using
+ The transformation matrix transforms the scene into view coordinates. Using
the default transformation, provided by the identity matrix, one pixel in
the view represents one unit in the scene (e.g., a 10x10 rectangular item
is drawn using 10x10 pixels in the view). If a 2x2 scaling matrix is
@@ -3891,7 +3896,7 @@ bool QGraphicsView::isTransformed() const
To simplify interation with items using a transformed view, QGraphicsView
provides mapTo... and mapFrom... functions that can translate between
scene and view coordinates. For example, you can call mapToScene() to map
- a view coordiate to a floating point scene coordinate, or mapFromScene()
+ a view coordinate to a floating point scene coordinate, or mapFromScene()
to map from floating point scene coordinates to view coordinates.
\sa transform(), rotate(), scale(), shear(), translate()