当您在 Qt Creator 的类 Interface 中定义成员函数时,您可以右键单击函数原型(prototype)并选择 Refactor->Add Definition in YouClass.cpp 。但如果你能为它设置一个快捷方式,这将非常方便。我在选项->快捷方式部分找不到它。
例如,在 Visual Assist 中,您可以按 ALT+SHIFT+Q。
最佳答案
You can press Alt+Enter to open a context menu that contains refactoring actions, which are available at the current cursor position.
Refactoring C++ Code 下的文档中也提到了这一点
也许也存在带有宏或类似方向的解决方案。
关于qt - 如何在Qt Creator中添加 "Add Definition in class.cpp"的快捷键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17853753/