summaryrefslogtreecommitdiffstats
path: root/examples/widgets/scroller/graphicsview/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/scroller/graphicsview/main.cpp')
-rw-r--r--examples/widgets/scroller/graphicsview/main.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/widgets/scroller/graphicsview/main.cpp b/examples/widgets/scroller/graphicsview/main.cpp
index 4009041cd8..c33a3091ed 100644
--- a/examples/widgets/scroller/graphicsview/main.cpp
+++ b/examples/widgets/scroller/graphicsview/main.cpp
@@ -74,7 +74,7 @@ public:
setFlag(QGraphicsItem::ItemClipsToShape, true);
}
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
// here we only want the size of the children and not the size of the children of the children...
qreal halfpw = m_pen.widthF() / 2;
@@ -85,7 +85,7 @@ public:
return rect;
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
{
Q_UNUSED(option);
Q_UNUSED(widget);
@@ -114,7 +114,7 @@ public:
: QGraphicsObject(parent)
{ }
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
QRectF rect;
foreach (QGraphicsItem *item, childItems())
@@ -122,7 +122,7 @@ public:
return rect;
}
- void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) Q_DECL_OVERRIDE
+ void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override
{ }
};
@@ -150,7 +150,7 @@ public:
return m_viewport;
}
- bool event(QEvent *e) Q_DECL_OVERRIDE
+ bool event(QEvent *e) override
{
switch (e->type()) {
// ![2]
@@ -179,7 +179,7 @@ public:
return QGraphicsObject::event(e);
}
- bool sceneEvent(QEvent *e) Q_DECL_OVERRIDE
+ bool sceneEvent(QEvent *e) override
{
switch (e->type()) {
case QEvent::TouchBegin: {
@@ -204,12 +204,12 @@ public:
return QGraphicsObject::sceneEvent(e);
}
- QRectF boundingRect() const Q_DECL_OVERRIDE
+ QRectF boundingRect() const override
{
return QRectF(0, 0, m_size.width() + 3, m_size.height());
}
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
{
Q_UNUSED(option);
Q_UNUSED(widget);
@@ -275,7 +275,7 @@ public:
protected:
- void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE
+ void resizeEvent(QResizeEvent *e) override
{
// resize the scene according to our own size to prevent scrolling
m_scene->setSceneRect(0, 0, m_view->viewport()->width(), m_view->viewport()->height());