Unable to change __class__ of PySide.QtGui objects
I've used PyQt4 quite a lot - sometimes I like to overload some of the objects to allow me to add some functionality. This works fine in PyQt4, eg: from PyQt4 import QtGui button = QtGui.QPushButton() class MyPushButton(QtGui.QPushButton): pass button.__class__ = MyPushButton However, I'm trying to adapt some of my code so that it uses PySide instead of PyQt4. My understanding is that they should have the same functionality. PySide will not allow me to do the same thing. from PySide import QtGui button = QtGui.QPushButton() class MyPushButton(QtGui.QPushButton): pass button.__class__ =