diff options
Diffstat (limited to 'examples/widgets/itemviews/stardelegate/starrating.cpp')
-rw-r--r-- | examples/widgets/itemviews/stardelegate/starrating.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/itemviews/stardelegate/starrating.cpp b/examples/widgets/itemviews/stardelegate/starrating.cpp index af67ae11da..568666f93a 100644 --- a/examples/widgets/itemviews/stardelegate/starrating.cpp +++ b/examples/widgets/itemviews/stardelegate/starrating.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ #include <QtWidgets> -#include <math.h> +#include <cmath> #include "starrating.h" @@ -53,8 +53,8 @@ StarRating::StarRating(int starCount, int maxStarCount) starPolygon << QPointF(1.0, 0.5); for (int i = 1; i < 5; ++i) - starPolygon << QPointF(0.5 + 0.5 * cos(0.8 * i * 3.14), - 0.5 + 0.5 * sin(0.8 * i * 3.14)); + starPolygon << QPointF(0.5 + 0.5 * std::cos(0.8 * i * 3.14), + 0.5 + 0.5 * std::sin(0.8 * i * 3.14)); diamondPolygon << QPointF(0.4, 0.5) << QPointF(0.5, 0.4) << QPointF(0.6, 0.5) << QPointF(0.5, 0.6) |