[PyQt] Pickle Support

Phil Thompson phil at riverbankcomputing.co.uk
Mon Apr 30 08:49:18 BST 2007


On Monday 30 April 2007 8:02 am, Mark Summerfield wrote:
> On Sun 29-Apr-07, Phil Thompson wrote:
> > The current SIP snapshot now supports the provision of handwritten code
> > for pickling wrapped classes. It also automatically pickles enums. It
> > does not have the usual pickle restriction of not being able to pickle
> > nested types.
> >
> > The current PyQt4 snapshot has pickle support for the following
> > classes...
> >
> > QByteArray, QChar, QColor, QDate, QDateTime, QKeySequence, QLatin1Char,
> > QLatin1String, QLine, QLineF, QMatrix, QPoint, QPointF, QPolygon, QRect,
> > QRectF, QSize, QSizeF, QString, QTime
>
> Phil,
>
> This is good news (and now covered in the book:-)
>
> I'd consider a few more though:
>
> QBitmap
> QBrush
> QCursor
> QFont
> QIcon
> QImage
> QPalette?
> QPen
> QPixmap
> QPolygonF
> QStringList?

Possibly these can all be done - but just require more work. The ones that I 
have done have an existing Qt ctor that does the unpickling (although I 
invented a new one for QDateTime). Many of the above are actually unions of 
different data structures and it may nor always be possible to extract the 
data in the correct form.

Phil


More information about the PyQt mailing list