[Qt-qml] MouseArea for an image with transparent parts

Dominic Genest dom at biocad.ca
Thu Mar 18 19:06:37 CET 2010


Hi,

 > Could you perhaps write up a new suggestion task at 
http://bugreports.qt.nokia.com/ using component Declarative?

Yes, I have done that at http://bugreports.qt.nokia.com/browse/QTBUG-6862

 > If you have a patch to QtDeclarative you could also add a link to a 
merge request - but I have to tell you that this is not likely to be 
considered for the first release as we are mostly focused on stabilizing 
the current scope.

The code I have done to do that is probably not very interesting, since 
it is an event filter we have to install on our QDeclarativeView's 
QGraphicsScene. This is not a patch to QtDeclarative.

 > What's the use-case for having this?

A non-rectangular button.

 > Would you use non-rectangular buttons in your UI?

Yes. Of course it is never necessary, until you get a request to do that :)

 > Might be possible to find a work-around by knowing the background for 
this.

Well the background is simple: I have to implement a button having an 
uncommon shape, and I need "enter" and "leave" events to behave correctly.
The workaround I am using is an event filter; maybe I should have 
implemented a Qml extension?

Thanks for your time,

Dom

> Cheers,
> Henrik





More information about the Qt-qml mailing list