[Gammaray-interest] GammaRay for UI testing automation

Christian Gagneraud chgans at gmail.com
Tue Jun 19 01:46:36 CEST 2018


On 18 June 2018 at 19:50, Volker Krause <volker.krause at kdab.com> wrote:
> On Sunday, 17 June 2018 04:31:53 CEST Christian Gagneraud wrote:
>> On 15 June 2018 at 23:07, Volker Krause <volker.krause at kdab.com> wrote:
>> > On Friday, 15 June 2018 05:12:53 CEST Christian Gagneraud wrote:
>> >> On 14 June 2018 at 03:47, Volker Krause <volker.krause at kdab.com> wrote:
>> Are all specialised Object tree implemented as ObjectFilterProxyModel?
>> I saw that this is how WidgetTreeModel works.
>
> Actually the widget model is probably the last one to still use this approach,
> it's what leads to the incorrect hierarchy described above. All the other
> specialized models (Quick, QGV, Qt3D, etc) redo the entire hierarchy handling.
> That's a lot more work, but it gives us full control over the result.

OK, I see. So all I need is a QAstractItemModel to access the object
hierarchy, all implementations respecting the promise of providing a
name and a type for each node.
And I need to sort out how to access the property extensions models...
That all sound generic and beautiful (and I like it), but it doesn't
help with class hierarchy.
Anyway i'll stick to the qobject tree for now, and will try to only
use the generic/standard interface as much as i can.

>> For example, the query engine could keep a few lookup tables by
>> monitoring the MetaObjectModel and ObjectListModel. Eg.
>> class name to QMO, object name to QO list and QMO to alive QO list.
>> But then you would need reverse lookup support to access model
>> indexes, unless these tables store the values as model index, but they
>> would have to be persistent, so it might induce a high cost...
>
> Right, but the reverse mapping is already present inside the models, they
> should be able to quickly go from ObjectId to QModelIndex, e.g. for
> synchronizing selection when picking objects. IIRC that's exposed via match()
> to the outside atm.

I see, wasn't aware of this way of doing, I'm not an item model expert...

Thanks a lot.

Chris


More information about the Gammaray-interest mailing list