Closed pritamghanghas closed 2 years ago
Well, I think this has historical reasons behind. I already forgot what was the initial implementation, but I think the recent one allows to access non-const members from the return value of message type.
PS: I'm asking to do not use the "Nested Message" term without special needs, since it triggers PTSR relapse :laughing:
Thanks for the quick fix.
Question When we define nested messages, the generated code makes accessor functions for nested messages. These nested messages return const reference type. Which make modifying them quite verbose.
eg.
now if we need to assign group from Qt side
node.childNode().setGroup("new value")
will obviously error out as it childNode() returns a const refOnly way to modify it I can think of
I understand that this is to make that variable a QProperty and its changed signal but it is very cumbersome if these objects are used a lot inside the code. Is there a way around it?
Is there a possibility of having something like QList:at and QList::operator[] kind of differentiation to have easy access ot those variables.
Additional context Add any other context or screenshots about the feature request here.