Qt Creator: Difference between revisions
 (Created page with "* Effortless debugging * Full CMake support using CMakeLists.txt - Qt build and run parameters are stored in CMakeLists.txt.user * Set up gnome-terminal to get command line in...")  | 
				No edit summary  | 
				||
| Line 1: | Line 1: | ||
=== FEATURES ===  | |||
* Effortless debugging  | * Effortless debugging  | ||
* Full CMake support using CMakeLists.txt - Qt build and run parameters are stored in CMakeLists.txt.user  | * Full CMake support using CMakeLists.txt - Qt build and run parameters are stored in CMakeLists.txt.user  | ||
=== CONFIGURE ===  | |||
* A new project defaults to an "all" build/run configuration; you will want build {debug|release} and run {debug|release} configs  | |||
** Use the projects button in the sidebar  | |||
** Rename "all" build to "release"  | |||
 Build dir: ./cmake-debug (TODO figure out how to avoid absolute path)  | |||
** Copy release to debug and adjust it  | |||
** In the debug build config, add a build step before make  | |||
 command: /usr/bin/cmake  | |||
 args: -DCMAKE_BUILD_TYPE=Debug .  | |||
 working dir: %{buildDir}  | |||
 (add it, and move it up above make)  | |||
** Rename run config to release  | |||
 add arguments, eg: melange 8080 test reanalyze  | |||
 working dir: use the project dir  | |||
 [x] Run in terminal  | |||
** Copy release to debug and adjust  | |||
* Set up gnome-terminal to get command line input and output going  | * Set up gnome-terminal to get command line input and output going  | ||
  Tools->Options->Environment->Terminal-> dropdown should include: /usr/bin/gnome-terminal -x  |   Tools->Options->Environment->Terminal-> dropdown should include: /usr/bin/gnome-terminal -x  | ||
* Clunky multi-window support; this gives you a new window that you can put on a different monitor; but you have to keep the Qt Creator command window around, don't use it to edit though bc ctrl-tab may pop you into another window  | * Clunky multi-window support; this gives you a new window that you can put on a different monitor; but you have to keep the Qt Creator command window around, don't use it to edit though bc ctrl-tab may pop you into another window  | ||
  Window-> Open in new window  |   Window-> Open in new window  | ||
Revision as of 15:52, 12 June 2016
FEATURES
- Effortless debugging
 - Full CMake support using CMakeLists.txt - Qt build and run parameters are stored in CMakeLists.txt.user
 
CONFIGURE
- A new project defaults to an "all" build/run configuration; you will want build {debug|release} and run {debug|release} configs
- Use the projects button in the sidebar
 - Rename "all" build to "release"
 
 
Build dir: ./cmake-debug (TODO figure out how to avoid absolute path)
- Copy release to debug and adjust it
 - In the debug build config, add a build step before make
 
command: /usr/bin/cmake
args: -DCMAKE_BUILD_TYPE=Debug .
working dir: %{buildDir}
(add it, and move it up above make)
- Rename run config to release
 
add arguments, eg: melange 8080 test reanalyze working dir: use the project dir [x] Run in terminal
- Copy release to debug and adjust
 
- Set up gnome-terminal to get command line input and output going
 
Tools->Options->Environment->Terminal-> dropdown should include: /usr/bin/gnome-terminal -x
- Clunky multi-window support; this gives you a new window that you can put on a different monitor; but you have to keep the Qt Creator command window around, don't use it to edit though bc ctrl-tab may pop you into another window
 
Window-> Open in new window