How to add short-key for “Add Definition in class.cpp” in Qt Creator

霸气de小男生 提交于 2019-12-20 11:35:14

问题


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.

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


回答1:


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

This is also mentioned in the documentation under Refactoring C++ Code

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




回答2:


As proposed by @Robin Karlsson:

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

As mentioned by @Dmitry Volosnykh, the above appears in the documentation (more concretely at Applying Refactoring Actions )



来源:https://stackoverflow.com/questions/17853753/how-to-add-short-key-for-add-definition-in-class-cpp-in-qt-creator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!