From 8b5a400581b9c037d12a9f49e075b187edcb0b00 Mon Sep 17 00:00:00 2001
From: Pierre Rossi <pierre.rossi@nokia.com>
Date: Fri, 24 Apr 2009 19:54:44 +0200
Subject: fixed minor issue with the piechart demo

The rubberband was not set on the viewport, leading to an offset when
adding margins.

Task-number: 251892
Reviewed-by: Alexis
---
 examples/itemviews/chart/pieview.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/itemviews/chart/pieview.cpp b/examples/itemviews/chart/pieview.cpp
index 6b62f25..48f4073 100644
--- a/examples/itemviews/chart/pieview.cpp
+++ b/examples/itemviews/chart/pieview.cpp
@@ -254,7 +254,7 @@ void PieView::mousePressEvent(QMouseEvent *event)
     QAbstractItemView::mousePressEvent(event);
     origin = event->pos();
     if (!rubberBand)
-        rubberBand = new QRubberBand(QRubberBand::Rectangle, this);
+        rubberBand = new QRubberBand(QRubberBand::Rectangle, viewport());
     rubberBand->setGeometry(QRect(origin, QSize()));
     rubberBand->show();
 }
-- 
cgit v0.12