[Qt-interest] only a part of a widget as transparent
Raja Rokkam
rokkamraja at gmail.com
Tue Dec 15 10:04:43 CET 2009
Cool!! tht's a nice learning for me :-) . Thanks...
-Raja.
On Tue, Dec 15, 2009 at 1:48 PM, Nitin Mahajan <nitinm76 at yahoo.com> wrote:
>
>
> --- On Tue, 15/12/09, Raja Rokkam <rokkamraja at gmail.com> wrote:
>
> > From: Raja Rokkam <rokkamraja at gmail.com>
> > Subject: Re: [Qt-interest] only a part of a widget as transparent
> > To: nitinm76 at yahoo.com
> > Cc: qt-interest at trolltech.com
> > Date: Tuesday, 15 December, 2009, 1:42 PM
> > well I havent tried it and so really cannot
> > comment on using setMask(). But looking at documentation, I
> > am not sure if it will be possible.
>
> Just tried that and it is possible. Suppose you have two widgets w1 and w2
> and say w1 is on top of w2.
>
> Now if you want to punch a hole in w2,in the region where w1 and w2
> intersect, take the xored region of the two widgets and set the xored region
> as mask on w2.
>
> regards
>
> -Nitin
> >
> > Can you tell me your exact usecase as to why you need this
> > ?
> >
> > -Raja.
> >
> >
> > On Tue, Dec 15, 2009 at 1:27 PM,
> > Nitin Mahajan <nitinm76 at yahoo.com>
> > wrote:
> >
> >
> >
> >
> >
> > --- On Tue, 15/12/09, Raja Rokkam <rokkamraja at gmail.com>
> > wrote:
> >
> >
> >
> > > From: Raja Rokkam <rokkamraja at gmail.com>
> >
> > > Subject: Re: [Qt-interest] only a part of a widget as
> > transparent
> >
> > > To: nitinm76 at yahoo.com
> >
> > > Cc: qt-interest at trolltech.com
> >
> > > Date: Tuesday, 15 December, 2009, 12:39 PM
> >
> >
> >
> > How to do it using QWidget::setMask()?
> >
> >
> >
> > regards
> >
> >
> >
> > -Nitin
> >
> >
> >
> > > add another widget on part you want to make
> >
> > > transparent and set the window flag
> >
> > > setAttribute(Qt::WA_TranslucentBackground);
> >
> > >
> >
> > > On Tue, Dec 15, 2009 at 12:09 PM,
> >
> > > Nitin Mahajan <nitinm76 at yahoo.com>
> >
> > > wrote:
> >
> > >
> >
> > > How to make, only a part of a
> >
> > > widget as transparent?
> >
> > >
> >
> > >
> >
> > >
> >
> > > regards
> >
> > >
> >
> > >
> >
> > >
> >
> > > -Nitin
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > > New Email names for you!
> >
> > >
> >
> > > Get the Email name you've always wanted on the
> > new
> >
> > > @ymail and @rocketmail.
> >
> > >
> >
> > > Hurry before someone else does!
> >
> > >
> >
> > > http://mail.promotions.yahoo.com/newdomains/aa/
> >
> > >
> >
> > >
> >
> > >
> >
> > > _______________________________________________
> >
> > >
> >
> > > Qt-interest mailing list
> >
> > >
> >
> > > Qt-interest at trolltech.com
> >
> > >
> >
> > > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> >
> >
> >
> >
> > Get your new Email address!
> >
> > Grab the Email name you've always wanted before someone
> > else does!
> >
> > http://mail.promotions.yahoo.com/newdomains/aa/
> >
> >
> >
> >
>
>
> Get your preferred Email name!
> Now you can @ymail.com and @rocketmail.com.
> http://mail.promotions.yahoo.com/newdomains/aa/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091215/68804014/attachment.html
More information about the Qt-interest-old
mailing list