[Qt-interest] Two window interaction.

Ulf-Alexander v. Ceumern-Lindenstjerna ceumern at vrmagic.com
Thu Nov 26 14:36:51 CET 2009


Take a look at QQ issue 29: http://doc.trolltech.com/qq/

I do not know if this covers it, but AFAIR the example was transparent
for mouse input in transparent regions. 

Check out the example code, that should address your problem.

Regards, Ulf

> -----Original Message-----
> From: manish.s.sharma at nokia.com [mailto:manish.s.sharma at nokia.com]
> Sent: Thursday, November 26, 2009 2:30 PM
> To: Ulf-Alexander v. Ceumern-Lindenstjerna; qt-interest at trolltech.com
> Subject: RE: [Qt-interest] Two window interaction.
> 
> Hi Ulf,
> 
> Thanks for the pointers. By enabling this attribute every click on the
> top widget is getting passed to below widget, which I don't want. What
> I want is only if it is clicked in the transparent area of the top
> widget event should go to the below widget. Is it possible that I can
> set Qt::WA_TransparentForMouseEvents for a region of a widget?
> 
> Any other clue?
> 
> Regards,
> Manish
> 
> >-----Original Message-----
> >From: ext Ulf-Alexander v. Ceumern-Lindenstjerna
> >[mailto:ceumern at vrmagic.com]
> >Sent: Thursday, November 26, 2009 6:47 PM
> >To: Sharma Manish.S (Nokia-D/Bangalore); qt-interest at trolltech.com
> >Subject: RE: [Qt-interest] Two window interaction.
> >
> >Try QWidget::setAttribute(Qt::WA_TransparentForMouseEvents)
> >
> >I read about that in Qt Quarterly some time ago.
> >
> >See:
> >http://doc.trolltech.com/4.5/qt.html#WidgetAttribute-enum
> >
> >cheers, Ulf
> >
> >> -----Original Message-----
> >> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> >> bounces at trolltech.com] On Behalf Of manish.s.sharma at nokia.com
> >> Sent: Thursday, November 26, 2009 2:04 PM
> >> To: qt-interest at trolltech.com
> >> Subject: [Qt-interest] Two window interaction.
> >>
> >> Hi All,
> >>
> >> I have two QWidget w1 and w2. W2 shown on top of w1 overlapping
> >> completely w1. W2's some part is transparent and we can see some
> part
> >> of w1 widgets through w2. Is it possible that if I click on the
> >> transparent part of w2, event goes to w1 widget? (w2 and w1 doesn't
> >> have any parent and child relationship).
> >>
> >> Regards,
> >> Manish
> >>
> >>




More information about the Qt-interest-old mailing list