Searching with the Locator
Another way to improve your productivity with Qt Creator is to use keyboard shortcuts. Qt Creator provides a lot of great keyboard shortcuts. Here is our selection:
One of our favorites is the Locator. Press Ctrl + K to activate it. Then you can enjoy several features:
- Enter a filename (you can even use a partial entry) and press Enter to open this file. If the Locator suggests multiple files, you can use the arrows up and down to navigate.
- Prefix your search by
.
(a dot followed by a space) to search C++ symbols in the current document. For example, on theTask.cpp
file of the first chapter, try to use the Locator with. set
and press Enter to go to theTask::setName()
function. - Enter
l
(L followed by a space) to go to a specific line. For example, "l 37" will bring us to line 37 of the current file
The Locator provides plenty of features; take a look when you press Ctrl + K the next time!