QtCreator for Eclipse Users

自闭症网瘾萝莉.ら 提交于 2019-12-24 05:36:13

问题


I recently switched to QTCreator for C++ from Eclipse background.

I am looking for these two features in QtCreator...

(1) I want to open the file a class is written in by typing that class's name. For example Ctrl+Shft+T in Eclipse.

(2) I want to move back to where my cursor were before the current operation.

Any shortcuts for above two features?


回答1:


  1. To open the file of a class:

    • If you are in a file that is making use of the class, you can place the cursor on the class then press F2. By default, F2 is bound to the Follow Symbol Under Cursor action.
    • If you want to get to the class without to find an instance of it, you can use the Locator . By default Press:
      • ctrl + k to access the locator
      • Type c then space to locate classes
      • Now type the name of your class. Once you've selected the class, hit enter
  2. To navigate back to where you were, you can use GoBack and GoForward, as mentioned by Roman Zaytsev. These default to alt + left and alt + right. It has been many years since I have used eclipse, but I thought it also used alt + left and right as I was pleased to find QtCreator used it as well.




回答2:


(2) I want to move back to where my cursor were before the current operation.

Go to Tools > Options > Environment > Keyboard. There assign shortcuts for "GoBack" and "GoForward" in "QtCreator" section.



来源:https://stackoverflow.com/questions/32128181/qtcreator-for-eclipse-users

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