summaryrefslogtreecommitdiffstats
path: root/src/library/stareditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/stareditor.cpp')
-rw-r--r--src/library/stareditor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/library/stareditor.cpp b/src/library/stareditor.cpp
index 4d5dc07960..8c38f9d8d5 100644
--- a/src/library/stareditor.cpp
+++ b/src/library/stareditor.cpp
@@ -82,7 +82,12 @@ void StarEditor::paintEvent(QPaintEvent*) {
}
void StarEditor::mouseMoveEvent(QMouseEvent *event) {
- int star = starAtPosition(event->x());
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
+ const int eventPosition = static_cast<int>(event->position().x());
+#else
+ const int eventPosition = event->x();
+#endif
+ int star = starAtPosition(eventPosition);
if (star != m_starRating.starCount() && star != -1) {
m_starRating.setStarCount(star);