[Development] Request for early MOC support for C++20 Modules

Sune Vuorela nospam at vuorela.dk
Fri Dec 15 16:19:57 CET 2023


On 2023-12-15, Elias Steurer via Development <development at qt-project.org> wrote:
> No, I still need all the get/set/notify functions to change/get the 
> variables from the outside. There is currently no way to do that, or am 
> I missing something? Something like this 
> https://gitlab.com/kelteseth/ScreenPlay/-/blob/master/ScreenPlayUtil/inc/public/ScreenPlayUtil/PropertyHelpers.h?ref_type=heads#L52 
> but as a standardized Qt macro.

My experience, after having written a few macros like that out of
projects, is that it is a bad idea, unless it is really thought thru.

What I have seen is that it encourages all properties to be
read/write/notify where at least many of them was only supposed to be
read/notify or read/constant.

/Sune



More information about the Development mailing list