Python: Pickle and Qt (PyQT)

后端 未结 1 923
抹茶落季
抹茶落季 2020-12-10 18:15

It would be quite entertaining to find why having an instance of Qt object as a MyClass()\'s attribute causes a two pages crash log. And how to avoid it:

imp         


        
相关标签:
1条回答
  • 2020-12-10 19:14

    From the docs:

    The following PyQt4 classes may be pickled.

    QByteArray
    QChar
    QColor
    QDate
    QDateTime
    QKeySequence
    QLatin1Char
    QLatin1String
    QLine
    QLineF
    QMatrix
    QPoint
    QPointF
    QPolygon
    QRect
    QRectF
    QSize
    QSizeF
    QString
    QTime
    

    Also all named enums (QtCore.Qt.Key for example) may be pickled.

    0 讨论(0)
提交回复
热议问题