[PyKDE] QPixmap.grabWidget() damages icons and QFilePreview doesn't work

Hans-Peter Jansen hpj at urpla.net
Sun Feb 13 15:18:38 GMT 2005


On Sunday 13 February 2005 10:17, Phil Thompson wrote:
> On Saturday 12 February 2005 11:37 pm, Hans-Peter Jansen wrote:
> >
> > Please don't, as I've found a way to make it work, e.g.:
> >
> > class Preview(QLabel):
> >     def __init__(self, parent = None):
> >         QLabel.__init__(self, parent)
> >         self.preview = QFilePreview()
> >         self.preview.previewUrl = self.previewUrl
>
> Clever. I didn't remove it, just changed the documentation as it
> has another legitimate use.

Thanks. BTW, I should have mentioned, that one have to use this class 
in this way now:

    	p = Preview(self)
        fd.setContentsPreviewEnabled(True)
        fd.setContentsPreview(p, p.preview)

Cheers,
Pete




More information about the PyQt mailing list