[PyKDE] Bug with QColorDialog::getRgba() ...

Phil Thompson phil at river-bank.demon.co.uk
Sat Feb 1 14:01:01 GMT 2003


On Saturday 01 February 2003 12:08 am, Sebastien Auclair wrote:
> With PYQT Win_Commercial 3.4
>
> The return of the call changes the type of the receiving variable.
>
> Here's a demonstration:
> >>> color = qRgba(1,1,1,1)
> >>> qRed(color)
>
> 1
>
> >>> color = QColorDialog.getRgba (c)
> >>> color
>
> (16843009, 1)
>
> >>> qRed(color)
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> TypeError: Argument 1 of qRed() has an invalid type

It's in the documentation. QColorDialog.getRgba() returns a tuple of the 
colour and the "ok" flag.

Phil




More information about the PyQt mailing list