I wrote a simple widget that inherits from QWidget like so:
class LineEditBase(QtWidgets.QWidget):
def __init__(self, label, parent=None, flags = QtCore.Qt.WindowFlags()):
#QtWidgets.QWidget.__init__(self, parent, flags)
super(LineEditBase, self).__init__(parent, flags)
self.label = QtWidgets.QLabel(label)
self.label.setMinimumSize(80, 20)
layout = QtWidgets.QHBoxLayout()
layout.setContentsMargins(0,0,0,0)
layout.addWidget(self.label)
self.setLayout(layout)
which gives me an error:
‘PySide2.QtWidgets.QWidget’ called with wrong argument types:
PySide2.QtWidgets.QWidget(int, WindowFlags)
Supported signatures:
PySide2.QtWidgets.QWidget(PySide2.QtWidgets.QWidget = NULL, PySide2.QtCore.Qt.WindowFlags = Qt.WindowFlags()) #
I’m sure this used to work in earlier versions of maya.
I tried not passing flags but no joy. Most likely I’m being silly so please help a fool out!
seb