On Wed, Sep 21, 2016 at 02:03:02PM +0200, Jean-Marc Lasgouttes wrote:

> Le 11/09/2016 à 11:37, Enrico Forestieri a écrit :
> >On Sun, Sep 11, 2016 at 03:48:55AM +0100, Guillaume Munch wrote:
> >>
> >>Getting the perfect result is a good reason for having such a
> >>long code. Maybe the "ouch!" effect is because it is added as is.
> >>It looks like it could be made a function in qt_helpers or some other
> >>appropriate place, doesn't it? For better maintainability and
> >>re-use.
> >
> >I had also thought about modifying getPixmap by adding a size parameter
> >but I deemed the changes too large to be justifiable by a single usage.
> >However, I see that this strategy is also used for scaling the splash
> >screen (also taking into account the pixelratio thing, maybe for Mac).
> >This would make two usages and maybe justifies a helper method.
> >But everyone could do that (hint, hint ;)
> 
> What I do not understand is why the code for getting the same image in the
> tab bar is so much simpler. It does not look really worse to me.

Because QIcon internally does what we have to explicitly do for a pixmap.

-- 
Enrico

Reply via email to