In Qt Creator, is there an easy way to directly switch between the Design view and the .cpp file associated with the form (and vice-versa)?
When I go from Design mode to Edit mode (Ctrl-2), it annoyingly shows me the XML code of the .ui file, so I have to manually pick the .cpp file.
When I'm in the .cpp file of a form, the Design mode icon and shortcut (Ctrl-3) are disabled, so I have to manually pick the .ui file.
There must be a better way to switch between ui <--> cpp.
Buried in the menu, is the Tools -> Form Editor -> Switch Source / Form
command. It has the Shift-F4 hotkey and does exactly what I was looking for.
F7 doesn't seem to be bound to any command, so I rebound the FormEditor/FormSwitchSource
command to use F7 as the keyboard shortcut. I can now switch between ui <--> cpp with a single keypress!
EDIT:
There's a known bug with Qt Creator where it doesn't save the keyboard shortcut for the FormEditor/FormSwitchSource
command.
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