[vtkusers] switching from PyQt4 to PySide question
hchen
hjchen.work at gmail.com
Sat Dec 10 22:06:39 EST 2016
Hello,
I'm trying to figure out how to switch from PyQt4 to PySide for my VTK
program. From what I heard, it should be straight forward. But, when I took
the example:
http://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt
and replaced:
from PyQt4 import QtCore, QtGui
by:
from PySide import QtCore, QtGui
I got this error:
self.vtkWidget = QVTKRenderWindowInteractor(self.frame)
File
"/usr/local/lib/python3.5/site-packages/vtk/qt/QVTKRenderWindowInteractor.py",
line 204, in __init__
QWidget.__init__(self, parent, wflags|Qt.MSWindowsOwnDC)
TypeError: QWidget(QWidget parent=None, Qt.WindowFlags flags=0):
argument 1 has unexpected type 'PySide.QtGui.QFrame'
Can anyone please points out why is the error and what's involved in making
the switch? Do I need to remove PyQt and recompile VTK? And, I am on Ubuntu
16.04, with VTK 7.0, Python 3.5, QT4.8, PyQt 4.11.4, PySide 1.2.2, but in
the error, there is Qt.MSWindowsOwnDC, looks like it's for Windows?
Thanks a lot in advance!
Chen
--
View this message in context: http://vtk.1045678.n5.nabble.com/switching-from-PyQt4-to-PySide-question-tp5741493.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list