Y
Y
Yaroslav Pronin2015-07-31 12:18:06
Qt
Yaroslav Pronin, 2015-07-31 12:18:06

Alias ​​for all properties of a child object from outside in QML, perhaps?

Hello. Is it possible to make an alias for all properties of a child object from the outside? Or that through one alias to get access to all properties of the descendant from the outside. It is very inconvenient to list all possible properties in aliases, it takes a lot of space and time.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2015-07-31
@proninyaroslav

Rectangle {
  width: 300;
  height: 200;
  property alias nameTextTop: nameText // This alias is defined at top level and bound to Text element
 
  Text {
    id: nameText;
    color: "blue";
    text: "Some text fragment";
  }
}

wiki.qt.io/QML-Application-Structuring-Approaches#...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question