[Development] MouseArea: updating hover state when the area moves

Alan Alpert 416365416c at gmail.com
Wed Aug 21 19:14:07 CEST 2013

On Wed, Aug 21, 2013 at 8:31 AM, Josh Faust <jfaust at suitabletech.com> wrote:
> On Tue, Aug 20, 2013 at 12:44 AM, Nils Jeisecke <njeisecke at saltation.de>
> wrote:
>> On Tue, Aug 20, 2013 at 6:15 AM, Josh Faust <jfaust at suitabletech.com>
>> wrote:
>> >I'm curious what the reasoning behind this is. Is it just a performance
>> > optimization?
>> I think so. Currently scene items don't get a notification if their
>> absolute positioning changes while the relative position to the parent
>> does not.
>> See http://qt-project.org/forums/viewthread/10013/ for an older
>> discussion.
>> > I ask as it makes a number of things not work properly when:
>> >  * The window resizes (e.g. via keyboard)
>> >  * A MouseArea (such as a button) moves out from under the mouse
>> * MouseOver highlights don't disappear. This is very annoying in
>> ListViews when using the mouse wheel.
> That's too bad. It mostly causes minor graphical artifacts, but once you
> start to notice its effects it's everywhere.
> QtQuick devs: is this being looked into at all? If I can find a solution
> that has minimal performance impact would it be considered?

It's not being looked into right now. Since QtQuick positioning is
based on relative parent transforms this limitation fits in quite
naturally and there is no obvious way around it (with minimal
performance impact).

A solution with minimal performance impact would be considered, as
there's nothing conceptually invalid with knowing when your absolute
position changes, or having a more accurate hover state. However
significant behavior changes may not be possible until the next major
version. Fixing this specific detail of MouseArea might require a flag
or similar to get changed behavior in the current major version.

Alan Alpert

More information about the Development mailing list