I am using QMYSQL3 plugin to work with a MySQL database. I am also using the Model/View architecture as much as possible.

Does anyone know of a way to format the QVariant parameter of setData() to accept a geometry datatype?

I have something like this
PolyFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))')

Obviously, my goal is to avoid writing the SQL manipulations by hand and let the model do the work.