Read reattiva excellent QT Creator post!
And weitjong tips
Last thing is the generating of the qch help file
Hello,
I just got the samples debugging in QT Creator and thought I’d share as it took me a while to figure it out
It’s not perfect, looks messy because of the sample cmake set up and I don’t have much knowledge with cmake, but it works!
Below is from my Linux (Mint) codebase from github, but I think it will work on any platform.
[code]
-
Open QC Creator and create new project.
-
Select Import Project on the left and Importing existing project on the right and click choose.
-
Browser to the Build directory of the sample (ie: /home/user/Urho3D-master/Build/Samples/01_HelloWorld) click ok
-
The name I give it is qtProjectName, ie qt01HelloWorld, so I can see what QT Creator creates, click next.
-
It will auto select most files, I only leave the Makefile ticked, click next and finish
You’ll see your project loaded and ready to go -
Click run or debug, a pop up will come up asking for the executable
-
Click browse and go to the Bin where the samples are, pick the corresponding executable, (ie /home/xp/Urho3D-master/Bin/01_HelloWorld), click okay and okay, it will run/debug the executable
-
To add the code, right click your main project folder and select add existing files
-
Browse to the source foleder (ie /home/xp/Urho3D-master/Source/Samples/01_HelloWorld)
-
Select your .h and .cpp files etc.
-
for zooming in to functions etc you need to put all of the source code directories into the include file in your project, ie:
/home/user/Urho3D-master/Source/Engine/Engine
/home/user/Urho3D-master/Source/Engine/Scene
…
/home/user/Urho3D-master/Source/ThirdParty/AngelScript/include
/home/user/Urho3D-master/Source/ThirdParty/AngelScript/source
etc, etc, I just copy and paste from a file browser -
Urho3D + QT Creator = profit [/code]
Make sure you ran ./cmake_gcc.sh with
-DURHO3D_SAMPLES=1
to get the samples, and
-DCMAKE_BUILD_TYPE=Debug
for debugging!
If anyone knows of a better way, please let us know :ugeek:
I’m still new to the engine… so WIP
Edit #1
For step 11, creating your include file paths, I just use this:
copy and paste the content of all.txt and just remove the sample folders etc
You might need to install it, ie debian based:
Edit #2 Adding CHM file to QT Creator
You need to have doxygen and the graphics tools installed:
You’ll need the qhelpgenerator tool to convert it to qt help format.
You need to manually run:
qhelpgenerator index.qhp -o index.qch
In the /Urho3D-master/build/Docs run: make doc to create the helps files.
index.qhp will be created in /Urho3D-master/build/Docs/html