Quote Originally Posted by Nfrancisj View Post
I looked it up and the docs said the data type should be object.
A Python object could be something entirely different than a QObject.
Maybe PyQt maps QVariant to soemthing called "object".

Quote Originally Posted by Nfrancisj View Post
I looked up sample code online, and on stackoverflow, and they use object::tr()(in c++)
That creates a translated string.
A QString can be wrapped automatically into a QVariant, so the compiler can convert the QString into a QVariant when handling that line.
The example could have also used explicit QString or an int, etc.


Quote Originally Posted by Nfrancisj View Post
I'm using a qfilesystemmodel to get my source directory. I haven't tried creating my own model yet.
I see.

In case you can't get setHeaderData() to work you could still consider deriving from QFileSystemModel and reimplementing headerData().

Cheers,
_