summaryrefslogtreecommitdiffstats
path: root/examples/itemviews
diff options
context:
space:
mode:
Diffstat (limited to 'examples/itemviews')
-rw-r--r--examples/itemviews/chart/pieview.cpp2
1 files changed, 1 insertions, 1 deletions
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();
}