Skip to content

Commit

Permalink
Replace QRect with QRectF for improved precision in CPU demo test
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Jan 14, 2025
1 parent 1464296 commit 37e5797
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qwt/tests/test_cpudemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)))
Expand Down

0 comments on commit 37e5797

Please sign in to comment.