Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. syntax
    Log in to post

    • UNSOLVED QML: How to access context property if its name is shadowed by a component-local property?
      QML and Qt Quick • properties syntax shadowing • • Stefan Monov76  

      5
      0
      Votes
      5
      Posts
      1809
      Views

      @raven-worx: Yes, it's ambiguous because I don't know (or there isn't) a syntax for disambiguating. For example in C++ a roughly equivalent statement, involving a local text and a global text, would be text = ::text which is unambiguous. Hehe, I was discussing that with others last week, a way to differentiate context properties from regular object properties. Could be used in your case to disambiguate the root context property, or to access model properties from outside a delegate, for example : listView.currentItem::age without having to expose it as a property. This syntax is not achievable for the moment, but you could do something like this listView.currentItem.Context.property("age"), you won't get notified of any change though. You could also do it for the root context with a singleton exposing it with the same caveat about the changes.
    • UNSOLVED new Signal/Slot syntax with parent QWidget?
      General and Desktop • signal & slot connect parent syntax • • pauledd  

      10
      0
      Votes
      10
      Posts
      3238
      Views

      thanks for the enlightening!