[Qt-qml] MouseArea for an image with transparent parts
Dominic Genest
dom at biocad.ca
Tue Mar 16 14:12:24 CET 2010
Hi,
I have been trying Qml very much since the package that was released for
4.6.0, and I am very pleased of its syntax and extensibility.
Congratulations to all developers involved!
One feature I still miss very much, though, is the ability to use images
with an alpha channel and to have MouseArea s that take transparent
pixels into account for ignoring clicks on them. I have implemented an
event filter for that, but it resulted in quite hacky code in which I am
not completely confident, especially for the hover events part (”enter”
and “leave” events).
I know rectangle-only parts were chosen for performance considerations,
but I believe that having that feature as an optional flag (somehow like
the “smooth” properties) would be a very useful feature. Besides, maybe
I am missing some important point, but I think there could be a way of
organising things such that checking the transparency of one pixel in
each image for which the bounding rectangle coincides with the mouse
position would lead to very acceptable performances.
What do you think?
Dom
More information about the Qt-qml
mailing list