[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] qvariant_cast?
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2008-06-27 15:43:35
Message-ID: 2d8ee6554180b33a2c5832b54eb015ff () localhost
[Download RAW message or body]
On Fri, 27 Jun 2008 09:37:10 -0600, Carlos Scheidegger
<cscheid@sci.utah.edu> wrote:
> 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?
brush = QBrush(qvariant)
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic