I've created a QVariant object by passing a Python object (specifically, a list of numpy arrays) to its constructor, and I'm trying to have it read into a QDataStream object. Unfortunately, it doesn't work and gives me the error 'QVariant::save: unable to save type 428.'. The relevant code is below:
... mimeData = QtCore.QMimeData() encodedData = QtCore.QByteArray() stream = QtCore.QDataStream(encodedData, QtCore.QIODevice.WriteOnly) ... temp = QtCore.QVariant(element.coords) stream << temp ... As near as I can tell (printing debug messages immediately before and after), it has trouble with the 'stream << temp' line. Should I be doing something else, or can I not use QVariants in this way? This is with Python 2.5.1 on a Mac running OS X 10.5.3 with Qt 4.4.0, sip 4.76, and PyQt 4.4.2. Thanks, Adam _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
