Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.3.1
-
None
Description
The following signature doesn't reflect the C++ signature.
def drawText(self, r:Union[PySide6.QtCore.QRectF, PySide6.QtCore.QRect], flags:int, text:str, br:Union[PySide6.QtCore.QRectF, PySide6.QtCore.QRect]) -> None: ...
Also any calls to this function with the `br` argument specified result in the following exception:
ValueError: 'PySide6.QtGui.QPainter.drawText' called with wrong argument values: PySide6.QtGui.QPainter.drawText(PySide6.QtCore.QRectF(5.000000, 5.000000, 200.000000, 200.000000), 132, 'Label', PySide6.QtCore.QRectF(0.000000, 0.000000, 0.000000, 0.000000)) Found signature: PySide6.QtGui.QPainter.drawText(Union[PySide6.QtCore.QRectF, PySide6.QtCore.QRect], int, str, Union[PySide6.QtCore.QRectF, PySide6.QtCore.QRect])
You can reproduce it with this snippet:
from PySide6 import QtCore, QtGui, QtWidgetspainter = QtGui.QPainter()r = QtCore.QRectF(5.0, 5.0, 200.0, 200.0)painter.drawText(r, int(QtCore.Qt.AlignCenter), "Label", QtCore.QRectF())
QPainter::drawText(int x, int y, int width, int height, int flags, const QString &text, QRect *boundingRect = nullptr);
Attachments
Issue Links
- duplicates
-
PYSIDE-1996 "ValueError: 'PySide6.QtGui.QPainter.drawText' called with wrong argument values" even though the arguments are correct
- Closed