Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Convert Doxygen comments to QDoc comments
Forum Update on Monday, May 27th 2025

Convert Doxygen comments to QDoc comments

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
16 Posts 4 Posters 3.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bguivarch
    wrote on 27 Sept 2016, 12:34 last edited by
    #1

    Hello,

    I am trying to convert Doxygen comments to QDoc comments, but I am facing some troubles.
    For example, I looked at the Command Index but can't find matching commands for Doxygen's @author and @date tags.

    How do you do this with QDoc?

    Regards

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Sept 2016, 22:25 last edited by
      #2

      Hi,

      A quick look at the code of qdoc shows that there is a author and releasedate tag.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bguivarch
        wrote on 28 Sept 2016, 07:05 last edited by
        #3

        Hello,

        Thanks for your answer. Nonetheless, I have decided to go back to Doxygen because as far as I understood, to generate qdoc you have to provide HTML templates to tell him how to generates the pages. And I don't have time for that. Too bad there is not already an HTML template provided with qdoc.

        Regards

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 28 Sept 2016, 20:02 last edited by
          #4

          Do you mean these html elements ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bguivarch
            wrote on 29 Sept 2016, 11:40 last edited by
            #5

            Hello,

            Well...I guess I have to put these HTML variables in my .qdocconf file and bam magic!
            In my defense the documentation is a bit unclear as the example file doesn't contain these HTML details.
            I will give a second try to Qdoc, then!

            Regards

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 29 Sept 2016, 14:59 last edited by
              #6

              It would likely be an interesting addition.

              Please go to the bug report system and open a feature request for the documentation to improve that page.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • N Offline
                N Offline
                NameRakes
                wrote on 8 Jan 2017, 23:48 last edited by
                #7

                Hi SGaist, I am new to Qt, but (hopefully) learning fast! I really like the clean look of Qt-style documentation, that is QDoc (correct me if I am wrong). I am also interested in generating QDoc style presentation instead of doxygen produced output. I have already done quite a bit of doxygen style documentation in my code.

                I have quickly read the QDoc manual, but it is not clear to me if I have to rewrite my comments into CPP files? Do you have a specific example for the process of converting an existing code base with doxygen style comments in H/HPP files and generate QDoc style documentation? Any pointer is greatly appreciated.

                N 1 Reply Last reply 9 Jan 2017, 05:32
                0
                • N NameRakes
                  8 Jan 2017, 23:48

                  Hi SGaist, I am new to Qt, but (hopefully) learning fast! I really like the clean look of Qt-style documentation, that is QDoc (correct me if I am wrong). I am also interested in generating QDoc style presentation instead of doxygen produced output. I have already done quite a bit of doxygen style documentation in my code.

                  I have quickly read the QDoc manual, but it is not clear to me if I have to rewrite my comments into CPP files? Do you have a specific example for the process of converting an existing code base with doxygen style comments in H/HPP files and generate QDoc style documentation? Any pointer is greatly appreciated.

                  N Offline
                  N Offline
                  NameRakes
                  wrote on 9 Jan 2017, 05:32 last edited by
                  #8

                  Hi @SGaist I tried to execute qdoc.exe in the command line window with a sample .qdoc file for a class. I created .qdocconf as explained in the QDoc documentation. The first line of the config file is supposed to be include(compat.qdocconfig) as explained in the minimum required qdocconfig file section. The the program tried to open "include(compat.qdocconf)" as a FILE! So I removed include and provided directly the compat.qdcoconf as the first line in my .qdcoconf file and then reran the program.

                  Now qDoc.exe has eaten all my source code! No kidding, and my svn is not working. I am trying to restore my checkout from the repo. I hope I can get back my source code checked out.

                  I have no idea what is going on. Please let me know what is my recourse here? Thanks.

                  N 1 Reply Last reply 9 Jan 2017, 05:49
                  0
                  • N NameRakes
                    9 Jan 2017, 05:32

                    Hi @SGaist I tried to execute qdoc.exe in the command line window with a sample .qdoc file for a class. I created .qdocconf as explained in the QDoc documentation. The first line of the config file is supposed to be include(compat.qdocconfig) as explained in the minimum required qdocconfig file section. The the program tried to open "include(compat.qdocconf)" as a FILE! So I removed include and provided directly the compat.qdcoconf as the first line in my .qdcoconf file and then reran the program.

                    Now qDoc.exe has eaten all my source code! No kidding, and my svn is not working. I am trying to restore my checkout from the repo. I hope I can get back my source code checked out.

                    I have no idea what is going on. Please let me know what is my recourse here? Thanks.

                    N Offline
                    N Offline
                    NameRakes
                    wrote on 9 Jan 2017, 05:49 last edited by
                    #9

                    Ok, this is really bad. Most of my disk has been wiped out. I was running qdoc.exe, it took a while, so when I realized something was wrong, I killed it. By then the damage was done.
                    My CMake, Qt, including Microsoft installations have been wiped out. Although one can be never sure, it happened with the execution of qdoc.exe as explained in the Getting Started with QDoc chapter.

                    Luckily I was able to install svn and get back the source code from repo as of this afternoon. But I have lost some data that I didn't have on the cloud. Don't know how long ago was the back up.

                    This is NOT good news!

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 9 Jan 2017, 10:57 last edited by
                      #10

                      There's something else that's going funky.

                      qdoc opens source files in ReadOnly mode.

                      Can you show your setup files ?

                      What version of Qt are you using ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • N Offline
                        N Offline
                        NameRakes
                        wrote on 9 Jan 2017, 23:15 last edited by
                        #11

                        @SGaist I am working on it. Hopefully, It is not related to QDoc. Will get back to you.

                        1 Reply Last reply
                        0
                        • N Offline
                          N Offline
                          NameRakes
                          wrote on 11 Jan 2017, 05:04 last edited by
                          #12

                          Ok, I am almost certain it is the avast anti-virus program, and not qdoc. Other people have reported similar problems. Was running qdoc and avast at the same time, noticed something strange, and luckily stopped it.

                          It ate up the entire Qt installation tree, my source code and a bunch of apps (office, latex, cmake, ...). Was able to restore the apps and the source code from the repo (luckily had committed only that afternoon). But I did loose some data, some small prototype codes that I don't check-in to the repo.

                          My own Qt-based app is running fine, but the strange thing is my doxygen output is messed up. I see only File entries, no namespace::class level descriptions.

                          Wonder if qdoc interferes with doxygen generation? Do you think that's even possible?!

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 11 Jan 2017, 10:01 last edited by
                            #13

                            Anti-virus can be nasty with developers...

                            What do you mean by your doxygen output ? The help files generated by qdoc ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • VRoninV Offline
                              VRoninV Offline
                              VRonin
                              wrote on 11 Jan 2017, 10:23 last edited by
                              #14

                              Probably useless contribution:

                              QDoc and Doxygen are not 2 different products, Doxygen is in fact a fork of QDoc. Since Doxygen is now so common in the C++ world, it ended up being supported more than the parent project (QDoc).
                              You can generate qdoc files with doxygen and if you want them to look like normal Qt5 documentation you just need to change the CSS (a good place to start is https://github.com/fenderle/doxygen-qtify )

                              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                              ~Napoleon Bonaparte

                              On a crusade to banish setIndexWidget() from the holy land of Qt

                              1 Reply Last reply
                              1
                              • N Offline
                                N Offline
                                NameRakes
                                wrote on 11 Jan 2017, 18:46 last edited by
                                #15

                                Yes, I realize that QDoc and Doxygen are two different programs. Doxygen's help doc collection (in html) usually has a namespace tree, a class list, and a file list. Now I see only the file list. No actual documentation, just code listed for each file. I have to dig into why doxygen got messed up.

                                @VRonin your pointer is extremely valuable to me - the link to qtifying doxygen. That's exactly what I was looking for originally. But first I need to reinstate my doxygen output.

                                1 Reply Last reply
                                0
                                • N Offline
                                  N Offline
                                  NameRakes
                                  wrote on 12 Jan 2017, 00:29 last edited by NameRakes 1 Dec 2017, 00:31
                                  #16

                                  I managed to restore doxygen output. I tried this qtify.css - it does not have what I am looking for: Qt-style table of contents in each page at the right top corner + when the signature of a member function with many arguments is shown, Qt-style tries to do it all in 1 line unlike doxygen which puts 1 arg per line in the html output.

                                  I think that the TOC at right top corner comes from MD tags, but don't know how to combine that with the rest of the page in html. I hope css would allow this possibility. Will do more research. If I find it, will post. If you know, and can point me to a link that'd be great.

                                  Thanks, as usual, for all the help.

                                  1 Reply Last reply
                                  0

                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Groups
                                  • Search
                                  • Get Qt Extensions
                                  • Unsolved