Creating a rectangular icon

Antony Loebs barefootedjournalist at gmail.com
Thu Mar 4 01:17:12 CET 2010


On Wed, Mar 3, 2010 at 5:58 PM, Aaron J. Seigo <aseigo at kde.org> wrote:

> On March 3, 2010, Antony Loebs wrote:
> > Hmm...I added the following
> > def paintEvent(self, event):
> >     size = self.geometry()
> >     height = size.height()
> >     self.resize(height * 4, height)
> >
> > But that doesn't work. Do I need to completely re-implement drawing the
> > pixmap in paintEvent?
>
> yes; which isn't hard (it's one call). and you don't want to be resizing
> yourself in the paintEvent (that has the potential for endless looping due
> to
> resize -> repaint -> resize..)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100303/7c381b1c/attachment.htm 


More information about the Plasma-devel mailing list