Most useful (productive) shortcuts in Qt Creator

10,645

Solution 1

Comment/uncomment lines (select text and press). With this shortcut you can simply comment very large piece of code and uncomment it in future:

Ctrl + /

Autocomplete:

Ctrl + Space

History of clipboard. You get popup menu with all text which you pasted in Qt Creator and if you choose something and press Enter you paste this formatted text into your code

Ctrl + Shift + V

Solution 2

F2 aka "Follow Symbol Under Cursor"

(You can also use Ctrl + Left Mouse Button for this.)

Let me explain. In visual studio to obtain the same you have F12 (Go to definition) but this one open the search result and need you to select the possible matches. The difference between instant result and a possible two seconds or more to get what you want (especially with common names like open)

F4 aka "Switch\Header Source"

In several other visual text editors for C++ (including Visual) you have to manually locate the header corresponding to the current source or vice-versa. But it's effectiveness greatly depend on whether or not you are using SCU for your classes.

Share:
10,645
grzkv
Author by

grzkv

Engineer enjoying solving complex problems simply.

Updated on June 03, 2022

Comments

  • grzkv
    grzkv almost 2 years

    What is the your most useful and productive keyboard shortcut in Qt Creator?

    Following the trend of great questions asked about Eclipse CDT, vim, Intellij IDEA.

  • nbro
    nbro over 9 years
    How do you auto-format a piece of code?
  • Jablonski
    Jablonski over 9 years
    @nbro useful shortcut too, but I thought that it famous shortcut :) It is Ctrl+I
  • coyotte508
    coyotte508 almost 8 years
    Alt + Left/Right, to switch back and forth between two source files. Especially useful in combination with Ctrl+Click.
  • smoothware
    smoothware about 7 years
    I would like to add that using Ctrl + Tab functions like Alt+Tab does, allowing you to switch between all files opened in the editor. Very useful for toggling between two files which aren't header+source (F4).
  • Konstantin Burlachenko
    Konstantin Burlachenko about 4 years
    Ctrl + Shift + U - Find usage of symbol in project under cursor
  • Konstantin Burlachenko
    Konstantin Burlachenko about 4 years
    Ctrl + Shift + I -- Open Include Hierarchy wiki.qt.io/Qt_Creator_Keyboard_Shortcuts - List of some popular shortcuts