Quote:
Originally Posted by thiago.eec
|
That didn't work here. I had to use:
Code:
QTableWidgetItem.ItemType.UserType.value
And that doesn't work with Qt5. I get:
Code:
AttributeError: 'ItemType' object has no attribute 'value'
for the lines that use the above.
And with out the ".value", with Qt6, the error is:
Code:
TypeError: QTableWidgetItem(): arguments did not match any overloaded call:
overload 1: argument 1 has unexpected type 'str'
overload 2: argument 2 has unexpected type 'ItemType'
overload 3: argument 1 has unexpected type 'str'
overload 4: argument 1 has unexpected type 'str'
The line is:
Code:
super(ReadOnlyTableWidgetItem, self).__init__(text, QTableWidgetItem.ItemType.UserType)
With the ".value" for the Qt6 version.
What have I missed?