QVariant also accepts pointers to QObject instances.
If you don't want to rely on Qt then create your own variant class with strict conversion rules and use that.And if I want be also independent of any library what I could use instead of void*? (I'm using void* also in other functions, where I return an object)
Bookmarks