[PyQt] qvariant_cast?

Carlos Scheidegger cscheid at sci.utah.edu
Fri Jun 27 16:37:10 BST 2008


Hi,

	I have a QVariant that contains a QBrush, and I'd like to get it from  
PyQt. The Qt documentation mentions qvariant_cast for that purpose,  
but I see no PyQt methods that achieve a similar functionality (I see,  
however, toDouble and friends). I'm trying to get the background brush  
from index.data(QtCore.Qt.BackgroundRole) in a custom  
QItemDelegate.paint(). Maybe there's a simpler way?

Thanks,
-carlos


More information about the PyQt mailing list