Skip to content

Commit 37e5797

Browse files
committed
Replace QRect with QRectF for improved precision in CPU demo test
1 parent 1464296 commit 37e5797

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qwt/tests/test_cpudemo.py

+2-2
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, QRectF, Qt, QTime
14+
from qtpy.QtCore import QRectF, Qt, QTime
1515
from qtpy.QtGui import QBrush, QColor
1616
from qtpy.QtWidgets import QLabel, QVBoxLayout, QWidget
1717

@@ -225,7 +225,7 @@ def rtti(self):
225225

226226
def draw(self, painter, xMap, yMap, rect):
227227
margin = 5
228-
pieRect = QRect()
228+
pieRect = QRectF()
229229
pieRect.setX(rect.x() + margin)
230230
pieRect.setY(rect.y() + margin)
231231
pieRect.setHeight(int(yMap.transform(80.0)))

0 commit comments

Comments
 (0)