diff options
author | Friedemann Kleint <[email protected]> | 2021-03-19 15:31:46 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2021-03-19 18:29:40 +0100 |
commit | 306ecd14ccba188a1c88061715456c329c1ff79c (patch) | |
tree | 2515a0f138efd129d9921c7d4b460b7f9a58d9bf /examples/sql | |
parent | 3777356c08258f74413187e2406679f3b0c89b07 (diff) |
Port examples away from deprecated QMouseEvent::pos()
As a drive by, fix the left-over QtCharts callout example to work
after 227020b118fa38ada1d8bd579593dae61f6e3881.
Pick-to: 6.0
Task-number: PYSIDE-1122
Change-Id: I945b57950014e882d4efd3cb0cab47262ad108b6
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Diffstat (limited to 'examples/sql')
-rw-r--r-- | examples/sql/books/bookdelegate.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/sql/books/bookdelegate.py b/examples/sql/books/bookdelegate.py index d44abb5b1..f8b199d76 100644 --- a/examples/sql/books/bookdelegate.py +++ b/examples/sql/books/bookdelegate.py @@ -112,7 +112,7 @@ class BookDelegate(QSqlRelationalDelegate): return False if event.type() == QEvent.MouseButtonPress: - mouse_pos = event.pos() + mouse_pos = event.position() new_stars = int(0.7 + (mouse_pos.x() - option.rect.x()) / self.star.width()) stars = max(0, min(new_stars, 5)) model.setData(index, stars) |