[Interest] QML DOM question
Frank Mertens
frank at cyblogic.de
Tue Jun 19 17:07:43 CEST 2012
On 06/19/2012 01:43 PM, Daniel Kreuter wrote:
> Hello,
>
> I have a question about some internals of QML. How are components
> internally stored? I have a little problem and want to understand why
> he behaves the way he does but at the moment I don't know what's going
> on. To make clear what I mean I will try to explain the situation.
>
> I have something like a PagePanel with 3 different Page items inside,
> each of these owns different components.
> Now I have a component MyComponent on page1, and another instance of
> the same component on page2.
> The one on page1 defines a seperate MouseArea to handle mouse events,
> the one on page2 doesn't. But when I click the component on page2, the
> mouse event is handled which should be handled on page1, but not on
> page2 because the component on page2 doesn't define a MouseArea.
> So can it be that internally components share common properties and
> just save the differences? So this would explain why the component on
> page2 behaves the same way as the one on page1.
>
Hi Daniel!
No, the 2 instances of MyComponent in your case do not share the
MouseArea. More likely both instances (graphics items) are visible
on top of each other.
Happy hacking,
Frank.
More information about the Interest
mailing list