QPainter.drawText needs QPointF not x, y

This commit is contained in:
Ogi Moore 2021-10-05 20:47:15 -07:00
parent b075035b0d
commit 5917e5e666
1 changed files with 1 additions and 1 deletions

View File

@ -78,6 +78,6 @@ class GLGradientLegendItem(GLGraphicsItem):
x = 1.1 * self.size[0] + self.pos[0]
y = self.size[1] - labelPosition * self.size[1] + self.pos[1] + 8
##todo: fonts
painter.drawText(x, y, labelText)
painter.drawText(QtCore.QPointF(x, y), labelText)
painter.end()