Ok, I have a real solution for you. I had the same problem that I could do alt + enter , and I could only auto-generate each method. You can get around this using alt + insert . This brings up the generation menu in Clion. From here, select generate definitions , in which a menu appears in which you can either select all definitions or select several favorites that you want to create.
Clion is smart enough to know you already created a definition, so you don't have to worry about duplicate definitions here. I found that with QT, however, some classes have Meta Object compiler overrides that will be displayed here, so I won’t select them when creating definitions, but for most use cases, when each item in the generate definitions list just create things. which you actually defined in the title.
Note that you can also right-click on the name of your class and go to Generate... and you will be given the same options.
EDIT: note, if you really want the original author’s behavior, you can select the “generate in-place” option as soon as you go to the screen for selecting the definition generation function
source share