From 37e5797e3f015c7d7363c8c7c0c7f49f678df0b1 Mon Sep 17 00:00:00 2001 From: Pierre Raybaut Date: Tue, 14 Jan 2025 09:12:01 +0100 Subject: [PATCH] Replace QRect with QRectF for improved precision in CPU demo test --- qwt/tests/test_cpudemo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qwt/tests/test_cpudemo.py b/qwt/tests/test_cpudemo.py index bc0a7ed..4ea11e0 100644 --- a/qwt/tests/test_cpudemo.py +++ b/qwt/tests/test_cpudemo.py @@ -11,7 +11,7 @@ import os import numpy as np -from qtpy.QtCore import QRect, QRectF, Qt, QTime +from qtpy.QtCore import QRectF, Qt, QTime from qtpy.QtGui import QBrush, QColor from qtpy.QtWidgets import QLabel, QVBoxLayout, QWidget @@ -225,7 +225,7 @@ def rtti(self): def draw(self, painter, xMap, yMap, rect): margin = 5 - pieRect = QRect() + pieRect = QRectF() pieRect.setX(rect.x() + margin) pieRect.setY(rect.y() + margin) pieRect.setHeight(int(yMap.transform(80.0)))