Not working on Python 3.10.0 or below
Errors in "OnCreate", "Populate Form", "reset_and_populate", "headerData"
AttributeError: Error calling Python override of QAbstractTableModel::headerData(): module 'PtQt5.QtCore' has no attribute 'QVariant'
Please support this py version, this plugin is one of the bests 🙏
Thanks for the compliments. :)
I've switched to Python 3.10.0 and the plugin works fine. See:
What is your IDA version?
That is very strange. I am on 9.2 but I will send the full log later on.
Sorry for the late reply, but here we go:
IDA Pro 9.2 Python Version: 3.10.0 (exact version according to IDA: 3.10.150.1013)
Log:
IDAPython: Error while calling Python callback <OnCreate>:
Traceback (most recent call last):
File "C:/Users/t6/AppData/Roaming/Hex-Rays/IDA Pro/plugins/showcomments.py", line 71, in OnCreate
self.PopulateForm()
File "C:/Users/t6/AppData/Roaming/Hex-Rays/IDA Pro/plugins/showcomments.py", line 86, in PopulateForm
self.reset_and_populate()
File "C:/Users/t6/AppData/Roaming/Hex-Rays/IDA Pro/plugins/showcomments.py", line 153, in reset_and_populate
self.table.setModel(self.proxy_model)
File "C:/Users/t6/AppData/Roaming/Hex-Rays/IDA Pro/plugins/showcomments.py", line 50, in headerData
return QtCore.QVariant()
AttributeError: Error calling Python override of QAbstractTableModel::headerData(): module 'PyQt5.QtCore' has no attribute 'QVariant'
The UI is attempted to be drawn but it is in a broken/incomplete state and nothing can be really used. The logs mention Qt5 but starting with IDA Pro 9.2, QT5 was replaced with QT6. Is that maybe what's causing this?
Thanks for the detailed logs!
Yeah, certainly it's Qt. What version are you using? I'm on 5.15.3:
Also, can you check if https://github.com/merces/showcomments/tree/fix/qt5-variant fixes it?
Thanks!
QT_VERSION_STR=6.8.2
Will test that fix asap
Just tried it out and that new version works! Thanks a lot!