Skip to content

Commit 1464296

Browse files
committed
Use QRectF instead of QRect for improved precision in CPU demo test
1 parent 1c1d609 commit 1464296

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qwt/tests/test_cpudemo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import os
1212

1313
import numpy as np
14-
from qtpy.QtCore import QRect, Qt, QTime
14+
from qtpy.QtCore import QRect, QRectF, Qt, QTime
1515
from qtpy.QtGui import QBrush, QColor
1616
from qtpy.QtWidgets import QLabel, QVBoxLayout, QWidget
1717

@@ -263,7 +263,7 @@ def rtti(self):
263263

264264
def draw(self, painter, xMap, yMap, rect):
265265
c = QColor(Qt.white)
266-
r = QRect(rect)
266+
r = QRectF(rect)
267267

268268
for i in range(100, 0, -10):
269269
r.setBottom(int(yMap.transform(i - 10)))

0 commit comments

Comments
 (0)