I have been searching a lot on this but of no use. Is there any shortcut to copy an entire line with a keyboard shortcut in QT creator? I have seen shortcut for cutting a line but that's not what i want..
Select the text you want to copy and press Ctrl+C. Place your cursor where you want to paste the copied text and press Ctrl+V.
Ctrl-C works by itself to copy the entire line.
To select a line of text, place your cursor at the start of the line, and press Shift + down arrow. To select a paragraph, place your cursor at the start of the paragraph, and press Ctrl + Shift + down arrow.
As a workaround you may want to use some kind of Shift+Home / Shift+End for line selection and usual copy-cut-paste hotkeys after it.
The shortcut list is user configurable in Tools menu -> Options -> Environment -> Keyboard
.
And the default shortcut to copy a line is Ctrl + Ins.
Set cursor to the line you want copy and press Command+Alt+Down
or Command+Alt+Up
That's it!
You can also move a line:
Mark the line you want to move and press Command+Shift+Down
or Command+Shift+Up
Cheers!
ps: clearly they are shortcuts for mac!
pps: see also https://wiki.qt.io/Qt_Creator_Keyboard_Shortcuts
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