diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2012-10-15 17:06:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-22 19:36:43 +0200 |
commit | b213d5bfa3a8ed81077cd8eaf229764ff2f1b346 (patch) | |
tree | c38b11225116886274631306e6018ffd23cdc2af /src/widgets/graphicsview/qgraphicsproxywidget.cpp | |
parent | 11566de014ed22051a53f1f0c94697fd18a87500 (diff) |
Make QPen default to 1-width non-cosmetic.
Use the Qt4CompatiblePainting render hint when painting with QPainter to
treat default constructed QPens as cosmetic still.
The NonCosmeticDefaultPen render hint gets documented as obsolete, since
it was in any case not respected by the raster nor OpenGL paint engine.
Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsproxywidget.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsproxywidget.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp index 6dd03e76b0..762f93f55b 100644 --- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp +++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp @@ -1485,17 +1485,7 @@ void QGraphicsProxyWidget::paint(QPainter *painter, const QStyleOptionGraphicsIt if (exposedWidgetRect.isEmpty()) return; - // Disable QPainter's default pen being cosmetic. This allows widgets and - // styles to follow Qt's existing defaults without getting ugly cosmetic - // lines when scaled. - bool restore = !(painter->renderHints() & QPainter::NonCosmeticDefaultPen); - painter->setRenderHints(QPainter::NonCosmeticDefaultPen, true); - d->widget->render(painter, exposedWidgetRect.topLeft(), exposedWidgetRect); - - // Restore the render hints if necessary. - if (restore) - painter->setRenderHints(QPainter::NonCosmeticDefaultPen, false); } /*! |