How to compile only one file from project in QT creator. Is there a hotkey? For example in VS you can press Ctrl F7 and compile your current cpp file.
It is now possible to do it, since at least Qt Creator 2.8.1.
Use Build->Build file <filename>
or the shortcut Ctrl+Alt+B:
Or right click on a file in the project view, and there is a Build item in the context menu that builds just that file:
You can track the feature request or vote for it at https://bugreports.qt.io/browse/QTCREATORBUG-106.
Normally if you hit CTRL + B
, Qt Creator will call make
, which will in turn compile any files that have been modified since you compiled the last time. AFAIK there is no designated key for re-building the current file.
However, all Keystrokes can be configured in the application preferences General -> Keyboard
. There are also a number of interesting other commands you might find useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With