No announcement yet.

UE4 C++ Documentation within Qt Creator

  • Filter
  • Time
  • Show
Clear All
new posts

    UE4 C++ Documentation within Qt Creator

    Antares made a nice tutorial (check it out here) on how to setup Qt Creator for editing UE4 C++ code. Qt Creator is loved for being very light on system resources and for having speedy intellisense. Another nice feature of Qt Creator is "integrated documentation" (that's what I like to call it). In this post I will show you how to integrate UE4 documentation into Qt Creator, this way you can select a UE4 class or function and press F1 and the documentation page of the given element will pop up to the side.

    This tutorial assumes you followed Antares' tutorial or have somehow managed to get Qt Creator to edit your UE4 C++ code. Since I only have UE 4.1 I was able to follow through Antares' tutorial by replacing every reference to "4.2" with "4.1" in the includes.pri file.

    So here are the steps to integrate UE4 documentation into Qt Creator.

    1. Build UE4 documentation with Doxygen. Make sure you generate a .qch file. I already did this step but only for version 4.1 of Unreal Engine. Here it is. I don't know if this file will work if you're using UE 4.2 or if you have UE 4.1 installed in a path different from the default one, but it might.

    2. Open Qt Creator and select Tools > Options... from the main menu, then click on Help in the list to the left.

    3. Click on the Documentation tab and click on the Add... button. Select the .qch file.

    4. Click on OK and restart Qt Creator.

    5. Open the .pro file of your UE4 game.

    6. Test it out, open your game's *GameMode.cpp file, then click on FPostConstructInitializeProperties in your constructor's arguments list, and press F1. I suggest checking the integrated documentation with FPostConstructInitializeProperties because it worked for me but when I click on some of the other class names (like UPrimitiveComponent) no documentation shows up and I don't know why. AActor also works. This might have to do with which header files are being included.

    If you have a hard time with these instructions, try watching this video.

    After you add the .qch file and restart Qt Creator, it might still take a while for the documentation to get recognized, so be patient at first, it shouldn't take more than 2 minutes. If you go to Help mode and browse the help contents you will find an entry called "Unreal Engine" at the bottom. You can already view that information, but the "pop up" information (the info that shows when you select something in the code and press F1) should work if you're using UE 4.1, I don't know if it'll work out of the box with UE 4.2.

    Also note that I don't know how to make the documentation look nice like in the official online docs, I just know how to build the UE4 docs with the traditional Doxygen look.

    What do you guys think? Let me know if anything goes wrong when using UE 4.2, if it doesn't work I'll post a tutorial on how to build the docs and obtain the .qch file. If it doesn''t work with UE 4.2, try replacing all occurences of "4.2" with "4.1" in the includes.pri file of your Qt Creator project (assuming you have UE 4.1 installed and assuming you followed through Antares' tutorial).
    Last edited by danieltm64; 07-04-2014, 02:22 PM.

    More details needed

    Hi, could you please offer some more detailed steps here:

    "1. Build UE4 documentation with Doxygen. Make sure you generate a .qch file."

    I currently try to set up QTCreator on a mac. Project file works, build, deploy and docs integration are still left to do.
    Would be very nice to get some support. Once I'm done I will happily share all my finidings and steps here in the forum.

    ciao Matthias


      Originally posted by sureal View Post
      Hi, could you please offer some more detailed steps here:

      "1. Build UE4 documentation with Doxygen. Make sure you generate a .qch file."
      Seconded, I'm not familiar with Doxygen or Qt documentation stuff, a hint as to how to get to this point would be very appreciated.