[Qt-creator] Refactor > generate missing property members Crunchiness

Jason H jhihn at gmx.com
Wed May 12 16:20:13 CEST 2021


1. I love that QtC can "Generate missing property members"
But I don't love that it generates the function definition in the .h file

2. I love that QtC can "Move the definition to the .cpp file"
But I don't love that it drops you into the .cpp file. Then I have to go back to the file and repeat. Given that a property typically has a getter and a setter, I am doing this twice for each proeprty.


1&2 could be fixed by a variety of resolutions:
a. "Generate missing property members" automatically generating them in the .cpp file
b. add "Generate missing property members in .cpp" option
c. minimally, just leaving me in the .h file

I seem to have discovered a bug in the auto-completion of the Q_PROPERTY(type name ...) generation. If you tab though and loop back around, when I "generated missing property members", it generated them with "x" as the type - an actual x, and not the type in the Q_PROPERTY statement


More information about the Qt-creator mailing list