On Monday 22 November 2010 06:46:17 TP wrote:
> 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
My understanding is that QString is replaced by unicode, thus eliminating the
(sometimes annoying) need to re-cast QString variable values to unicode. If
my frail memory serves me right, the QVariant is no longer required and has
been deleted for PySide.
OldAl.
--
OldAl
[email protected]
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside