Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
None
-
6.5
-
None
Description
QWidget.render docs, both Python and C++ indicate that the QWidget.render method can take just a QPaintDevice or QPainter and no more, with the rest of the parameters being provided with defaults.
Presently, if you do not provide a QPoint, you will get a TypeError indicating QWidget.render was called with the wrong argument types.
If you call render with just a QPainter you get this:
TypeError: 'PySide6.QtWidgets.QWidget.render' called with wrong argument types: PySide6.QtWidgets.QWidget.render(QPainter) Supported signatures: PySide6.QtWidgets.QWidget.render(PySide6.QtGui.QPainter, PySide6.QtCore.QPoint, Union[PySide6.QtGui.QRegion, PySide6.QtGui.QBitmap, PySide6.QtGui.QPolygon, PySide6.QtCore.QRect] = Default(QRegion), PySide6.QtWidgets.QWidget.RenderFlag = Instance(QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren))) PySide6.QtWidgets.QWidget.render(PySide6.QtGui.QPaintDevice, PySide6.QtCore.QPoint = Default(QPoint), Union[PySide6.QtGui.QRegion, PySide6.QtGui.QBitmap, PySide6.QtGui.QPolygon, PySide6.QtCore.QRect] = Default(QRegion), PySide6.QtWidgets.QWidget.RenderFlag = Instance(QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)))
See attached example.
void QWidget::render(QPaintDevice *target, const QPoint &targetOffset = QPoint(), const QRegion &sourceRegion = QRegion(), QWidget::RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren)) void QWidget::render(QPainter *painter, const QPoint &targetOffset = QPoint(), const QRegion &sourceRegion = QRegion(), QWidget::RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren)) explicit QPainter(QPaintDevice *);