Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
6.3.0
-
None
-
PyCharm 2021.3 Community Edition
Python 3.8
Windows 10 Pro 21H2
Description
I've been working on the translation of this example:
https://doc.qt.io/qtforpython-5/overviews/qtwidgets-painting-pathstroke-example.html#path-stroking
from c++ into python and I've run into some issues with the imports of the method
PySide6.QtCore.QPointF.__mul__()
According to the documentation:
it should support as a parameter either a float, a PySide6.QtGui.QMatrix4x4 or a
PySide6.QtGui.QTransform, but when trying to perform
QPointF(0.1, 0.25) * (m * vm)
the following Error is risen:
TypeError: 'PySide6.QtCore.QPointF.__mul__' called with wrong argument types: PySide6.QtCore.QPointF.__mul__(QTransform) Supported signatures: PySide6.QtCore.QPointF.__mul__(float)
After looking into the QPointF.py file the installation of PySide6 has created locally, I found out that there was only one of the three definitions, which is the following:
def __mul__(self, c): # real signature unknown; restored from __doc__
"""
__mul__(self, c: float) -> PySide6.QtCore.QPointF
Return self*value.
"""
pass
There is only the one supporting a float as parameter.
corelib/tools/qpoint.h:289: friend constexpr inline QPointF operator*(const QPointF &p, qreal c) corelib/tools/qpoint.h:291: friend constexpr inline QPointF operator*(qreal c, const QPointF &p) gui/math3d/qmatrix4x4.h:834:inline QPointF operator*(const QPointF& point, const QMatrix4x4& matrix) (deprecated since 6.1) gui/math3d/qmatrix4x4.h:865:inline QPointF operator*(const QMatrix4x4& matrix, const QPointF& point) gui/painting/qtransform.h:361:inline QPointF operator*(const QPointF &p, const QTransform &m)