[vtkusers] switching from PyQt4 to PySide question

hchen hjchen.work at gmail.com
Sat Dec 10 22:06:39 EST 2016


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: 
and replaced:
    from PyQt4 import QtCore, QtGui
    from PySide import QtCore, QtGui
I got this error:
    self.vtkWidget = QVTKRenderWindowInteractor(self.frame)
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!


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