[PyKDE] QVariant support in PyQt4

Phil Thompson phil at riverbankcomputing.co.uk
Tue Jan 3 23:54:47 GMT 2006

On Friday 30 December 2005 8:36 pm, Andreas Pakulat wrote:
> Hi,
> maybe I'm just too stupid, but it seems the following C++ code:
> qVariantFromValue(QColor(Qt::blue)
> cannot be correctly ported to PyQt4. Using
> QtCore.qVariantFromValue(QtCore.QVariant(QtGui.QColor(QtCore.Qt.blue)))

I've removed qVariantFromValue().

> I get a QVariant which type() function returns type number 66 (which
> would be QBrush, not QColor).

QVariant(QColor(Qt.blue)) will work in tonight's snapshot.

> Also QVariant lacks the value() function, thus I don't really have a
> clue how to check the real value that it contains.


More information about the PyQt mailing list