如何为“在 class.cpp 中添加定义"添加快捷键在 Qt Creator 中 [英] How to add short-key for "Add Definition in class.cpp" in Qt Creator

查看:26
本文介绍了如何为“在 class.cpp 中添加定义"添加快捷键在 Qt Creator 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您在 Qt creator 中的类 Interface 中定义成员函数时,您可以右键单击函数原型并选择 Refactor->Add Definition in YouClass.cpp .但这将非常方便,如果您可以为其设置快捷方式.我在选项-> 快捷方式部分找不到它.

When you define a member function in a class Interface in Qt creator you can right click on the function prototype and select Refactor->Add Definition in YouClass.cpp . But this will be really handy If you can set a shortcut for it. I couldn't find it in options->shortcut section.

例如在 Visual Assist 中,您可以按 ALT+SHIFT+Q.

For example in Visual Assist you can press ALT+SHIFT+Q.

推荐答案

您可以按 Alt+Enter 打开包含重构操作的上下文菜单,这些操作在当前光标位置可用.

You can press Alt+Enter to open a context menu that contains refactoring actions, which are available at the current cursor position.

重构下的文档中也提到了这一点C++代码

也许还有一个带有宏或朝这个方向的东西的解决方案.

Maybe a solution with a macro or something in that direction exists as well.

这篇关于如何为“在 class.cpp 中添加定义"添加快捷键在 Qt Creator 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆