Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, January 2008
Using model/view with user-type QVariant data


Message 1 in thread

Hi everybody,

I have a model containing user-type QVariant data.
I associated new QItemEditorCreatorBase objects to the user-types,
using registerEditor.
This works well for item edition, but not for item display, as these
types cannot be converted to strings by QVariant.
Is there a way to tell QVariant how to convert user types to QString?

Otherwise, I will have to overload the model's data() function to do
the QString conversion, but this prevents me from using standard model
classes.

Regards,

Etienne