Get a property that is an object

Bug #1318829 reported by Tim Peeters
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Autopilot Qt Support
New
Undecided
Unassigned

Bug Description

Item {
    id: parentItem

   property Item complexProperty
}

We have a lot of code where inside an Item we define a complex property (such as an Item) that we need to access in autopilot, and of which the value can be set by other components. Currently I know of no way that we can use autopilot to get complexProperty from parentItem.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote : Re: [Bug 1318829] [NEW] Get a property that is an object

Hi Tim,

Thanks for the bug report. What is 'complexProperty' in the Qml snippet? If
you have time, providing a self-contained .qml file that runs within
qmlscene would make it much easier for us to reproduce, and fix this
problem.

Cheers,

On Tue, May 13, 2014 at 9:53 AM, Tim Peeters <email address hidden>wrote:

> Public bug reported:
>
> Item {
> id: parentItem
>
> property Item complexProperty
> }
>
> We have a lot of code where inside an Item we define a complex property
> (such as an Item) that we need to access in autopilot, and of which the
> value can be set by other components. Currently I know of no way that we
> can use autopilot to get complexProperty from parentItem.
>
> ** Affects: autopilot-qt
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of Autopilot
> Hackers, which is subscribed to Autopilot Qt Support.
> https://bugs.launchpad.net/bugs/1318829
>
> Title:
> Get a property that is an object
>
> Status in Autopilot Qt support:
> New
>
> Bug description:
> Item {
> id: parentItem
>
> property Item complexProperty
> }
>
> We have a lot of code where inside an Item we define a complex
> property (such as an Item) that we need to access in autopilot, and of
> which the value can be set by other components. Currently I know of no
> way that we can use autopilot to get complexProperty from parentItem.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/autopilot-qt/+bug/1318829/+subscriptions
>

--
Thomi Richards
<email address hidden>

Revision history for this message
Zsombor Egri (zsombi) wrote :

Tomi, 'complexProperty' is an Item, meaning is an object. While I understand objects cannot be transported the bus, there should be some way to access them. Same goes for the attached properties, as illustrated in the following simple, pure QML sample:

import QtQuick 2.2

ListView {
    width: 100
    height: 200
    model: 20
    delegate: Rectangle {
        id: rect
        width: parent.width
        height: 20
        Text {
            text: "Item #" + modelData + "out of " + rect.ListView.view.count
        }
    }
}

Where the 'ListView.view' from 'rect.ListView.view.count' is the attached property to the Rectangle with 'rect' as id. It would be really handy to be able to access those properties.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.