[GIVEN UP] Scoping Problem - how to explicitly access a parents property?

  • I have a strongly nested set of Items - here an abbreviated example:
    @Rectangle {
    ListView {
    model: A //a QQmlListProperty acting on a C++ list
    delegate: Rectangle {
    Rectangle {
    Button {
    text: model.propertyMadeVisibleFromC++
    ComboBox {
    model: B //some model specifically made for the ComboBox
    currentIndex: model.propertyMadeVisibleFromC++ - now I am accessing the wrong "model" and hence the requested property doesn't exist
    How could I access the ListView-model from within the ComboBox?

  • I switched to a GroupBox with lots of RadioButtons since I have to get this done. Doesn't look too bad, either. But if anybody ever finds out how to address a "model" of an ancestor from within a child that has its own "model", please let the rest of the world know!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.