Shortcut for choosing functions in Qt Creator
-
If I send Ctrl+K Qt Creator allows you to choose h or cpp file, then if I send Ctrl+K I can jump to nessesary line in Qt Creator
I need to browse betwen functions in chose class;
Say, I have Class with fn a, b, c
I know the name, dont want to scroll or use Ctrl+F to find the function
I need shorcut to send name or part of the name to jump to function
Please advise if its exist -
If I send Ctrl+K Qt Creator allows you to choose h or cpp file, then if I send Ctrl+K I can jump to nessesary line in Qt Creator
I need to browse betwen functions in chose class;
Say, I have Class with fn a, b, c
I know the name, dont want to scroll or use Ctrl+F to find the function
I need shorcut to send name or part of the name to jump to function
Please advise if its exist@JohnLocke said in Shortcut for choosing functions in Qt Creator:
I need shorcut to send name or part of the name to jump to function
Isn't this exactly what Ctrl + F does?!
You want to put the name there but dont want to search?! How should this work?
One option is to click and follow the declaration in header, since they have usually less lines than the code file. -
C Christian Ehrlicher moved this topic from General and Desktop on
-
If I send Ctrl+K Qt Creator allows you to choose h or cpp file, then if I send Ctrl+K I can jump to nessesary line in Qt Creator
I need to browse betwen functions in chose class;
Say, I have Class with fn a, b, c
I know the name, dont want to scroll or use Ctrl+F to find the function
I need shorcut to send name or part of the name to jump to function
Please advise if its exist@JohnLocke Press
Ctrl+K
and then typem
and start typing the name or part of the name of the function. It will list every member function that matches and you can jump to it. -
@JohnLocke Press
Ctrl+K
and then typem
and start typing the name or part of the name of the function. It will list every member function that matches and you can jump to it.@Chris-Kawa yes it works with exeptions: if you linked external library (not set into qmake pro.file) it would not work
-
I rarely use this kind of functionality in Qt Creator. Most of the time I put the cursor on a function in the current code and hit F2 to jump to the definition. You can also easily toggle between header and cpp file with F4. If your classes don't do too much in one place it is easy to find the right function in the header file and then hit F2 to switch to the definition. You can also split views (horizontally or vertically) to have multiple functions side-by-side. This is how I use Qt Creator most of the time. (Concerning Ctrl+K: There is a huge list of command listed that can be used here. If you are already inside the correct file you can use
.
(just a dot – after hitting Ctrl+K) followed by a space and then type any symbol name (i.e. also functions) to jump to a specific function in the open document. Get to the right source file withp
and then typing the file name.)