Srini wrote:

> > How can I do that with PySide?

>I haven't tried myself but I would check following

>1. If None is indeed used without quotes
>2. If you are parameterizing with %s, make sure special meaning of
>None is not getting lost
>3. I don't see in docs but QString seems to work fine. The way I used
>is  QtCore.QString.fromUtf8("something")
>    May be try setting QtCore.QString.fromUtf8("")

Thanks Srini,

1. and 2. : None was used without quotes. For example, I tried:

self.setData( qmodelindex, None )

in QSqlTableModel.

3. To the best of my knowledge, there is no QString in the last version of 
PySide, as well as there is no QVariant. Am I right?
And I think that your proposal to use:

QtCore.QString.fromUtf8("")

would lead to a "TEXT" column equal to the empty string in the database, not 
the special NULL value.

Thanks,

Julien

-- 
python -c "print ''.join([chr(154 - ord(c)) for c in '*9(9&(18%.\
9&1+,\'Z4(55l4('])"

"When a distinguished but elderly scientist states that something is
possible, he is almost certainly right. When he states that something is
impossible, he is very probably wrong." (first law of AC Clarke)

_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to