From 60661f586feb3d5ce29c27d6c7e5bcb4c0e19f8e Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Thu, 13 May 2021 08:23:06 +0800 Subject: [PATCH] fix: QVector3D has no copy constructor --- pyqtgraph/Vector.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyqtgraph/Vector.py b/pyqtgraph/Vector.py index a64e8968..8b730533 100644 --- a/pyqtgraph/Vector.py +++ b/pyqtgraph/Vector.py @@ -40,6 +40,9 @@ class Vector(QtGui.QVector3D): if len(vals) != 3: raise Exception('Cannot init Vector with sequence of length %d' % len(args[0])) initArgs = vals + elif isinstance(args[0], QtGui.QVector3D): + # PySide6 6.1 does not accept initialization from QVector3D + initArgs = args[0].x(), args[0].y(), args[0].z() elif len(args) == 2: initArgs = (args[0], args[1], 0) QtGui.QVector3D.__init__(self, *initArgs)