[Qt-interest] is it possible to fill the whole packground with a image while using brush

Pritam Ghanghas pritam_ghanghas at infosys.com
Tue Jul 27 07:45:49 CEST 2010


Thanks for the suggestion but I meant without overriding the paint.

On Mon, 2010-07-26 at 23:41 +0530, Anders Bakken wrote:
> On Fri, Jul 23, 2010 at 07:00:37AM +0100, Pritam Ghanghas wrote:
> > Hi All
> >
> > I have a problem with QPalette::Window color role.
> > I am using a image to create a brush for this role.
> > When I draw a widget with size more than the imageSize,
> > the brush is not scaled to the size, instead its tiled.
> > Is there way where in I can have it fill the whole window with out
> > tiling.
> >
> > Gradients have such a option (QGradient::ObjectBoundingMode). But I
> > couldn't find anything similar for texturePattern.
> >
> >
> > --
> > Thanks,
> > Pritam
> 
> You can just draw it yourself using QPainter. E.g. drawPixmap(rect(),
> backgroundImage);
> 
> --
> Anders Bakken
> 
> This message, including attachments, is intended solely for the addressee indicated in this message and is strictly confidential or otherwise privileged. If you are not the intended recipient (or responsible for delivery of the message to such person) : - (1) please immediately (i) notify the sender by reply email and (ii) delete this message and attachments, - (2) any use, copy or dissemination of this transmission is strictly prohibited. If you or your employer does not consent to Internet email messages of this kind, please advise Myriad Group AG by reply e-mail immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by Myriad Group AG unless otherwise indicated by an authorized representative independent of this message.




More information about the Qt-interest-old mailing list