[PyKDE] QPixmap from a QVariant?

David Boddie david at boddie.org.uk
Mon Oct 30 22:30:34 GMT 2006

On Mon Oct 30 21:44:59 MET 200, Jan Ekholm wrote:

> if (v.canConvert<Qicon>())
>      QPixmap p = v.value<QIcon>(v);
> How would one do that with PyQt? Any workarounds if it can't be cast to
> QIcon?

Does this work?

  icon = QIcon(v)


More information about the PyQt mailing list