Qt Creator has been my only choice for C++ IDE for years. I’m feeling ashamed that I’ve only discovered the usefulness of the “locator” recently.

The “locator” is located at the bottom left of Qt Creator where you can activate it by clicking or using shortcut key Ctrl+k.

 

 

When activated, it’ll show you a list of keys you can enter for specific purposes.

 

Switch To File / Search File

You can directly key in the file name that you want to switch to. As you input, the list will be filtered to fit your input.

 

Go To Line

There’s 2 way to go to line of current file using locator:

  1. Activate the locator, key in “l” and space then line number
  2. Activate the “go to line” mode of locator by pressing Ctrl+l and input the line number

 

Go to Function in Current File

Of course you can select the drop down menu on top of editor and select the function, as shown in the figure below.

qt-creator-function-list

 

But how if there’s a long list of function in current file? Don’t worry, locator come to the rescue. Just input “.”, space and then the function name, you’ll get a filtered function list in current document for selection.

qt-creator-function-list1

Git Operations

You can even perform some Git operation in locator! (If you enable the Git plugin in Qt Creator) You can actually push, pull, add and commit from locator by typing in git command.

 

Apart from the functions listed above, that’s a lot more things locator can do for you, to name a few:

  • Search C++ class
  • Execute command
  • Web search and etc.

You can get full list of locator’s function by visiting Qt Creator manual