aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/tutorials/extending/chapter6-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/tutorials/extending/chapter6-plugins')
-rw-r--r--examples/quick/tutorials/extending/chapter6-plugins/piechart.cpp3
-rw-r--r--examples/quick/tutorials/extending/chapter6-plugins/pieslice.cpp4
2 files changed, 3 insertions, 4 deletions
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/piechart.cpp b/examples/quick/tutorials/extending/chapter6-plugins/piechart.cpp
index dce05aeab9..295bb8961d 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/piechart.cpp
+++ b/examples/quick/tutorials/extending/chapter6-plugins/piechart.cpp
@@ -57,7 +57,7 @@ void PieChart::setName(const QString &name)
QQmlListProperty<PieSlice> PieChart::slices()
{
- return QQmlListProperty<PieSlice>(this, 0, &PieChart::append_slice);
+ return QQmlListProperty<PieSlice>(this, 0, &PieChart::append_slice, 0, 0, 0);
}
void PieChart::append_slice(QQmlListProperty<PieSlice> *list, PieSlice *slice)
@@ -68,4 +68,3 @@ void PieChart::append_slice(QQmlListProperty<PieSlice> *list, PieSlice *slice)
chart->m_slices.append(slice);
}
}
-
diff --git a/examples/quick/tutorials/extending/chapter6-plugins/pieslice.cpp b/examples/quick/tutorials/extending/chapter6-plugins/pieslice.cpp
index 3269fd60f2..52b409aa22 100644
--- a/examples/quick/tutorials/extending/chapter6-plugins/pieslice.cpp
+++ b/examples/quick/tutorials/extending/chapter6-plugins/pieslice.cpp
@@ -80,7 +80,7 @@ void PieSlice::paint(QPainter *painter)
{
QPen pen(m_color, 2);
painter->setPen(pen);
- painter->setRenderHints(QPainter::HighQualityAntialiasing, true);
- painter->drawPie(boundingRect(), m_fromAngle * 16, m_angleSpan * 16);
+ painter->setRenderHints(QPainter::Antialiasing, true);
+ painter->drawPie(boundingRect().adjusted(1, 1, -1, -1), m_fromAngle * 16, m_angleSpan * 16);
}