[PyQt] Setting QVariant properties in construction

Phil Thompson phil at riverbankcomputing.com
Mon Oct 10 12:41:07 BST 2011


On Sat, 08 Oct 2011 15:33:12 +0100, Jeremy Sanders
<jeremy at jeremysanders.net> wrote:
> Hi - is this code supposed to work?
> 
> w = QWidget()
> a = QPropertyAnimation(w, "maximumWidth", duration=1000, 
> endValue=QVariant(1000))
> 
> TypeError: unable to convert a Python 'QVariant' object to a C++
> 'QVariant' 
> instance
> 
> This is PyQt 4.8.3.
> 
> Jeremy

Fixed in tonight's PyQt snapshot. Also the nicer endValue=1000 alternative
should work as well.

Thanks,
Phil


More information about the PyQt mailing list