How is the Qt library organized?



  • Dear people,

    Okay, the title surely has multiple interpretations. Where I would like to refer to is which functionality is put in which (static) library?

    I’m using Qt 5.3.2 on gcc 5.1.0 with mingw-w64. As for a practical example I would like to experiment with a little program using the QCommandLineParser class. My development preference is to write makefiles myself to have full control over the build process. I’m referring to makefiles to be run with mingw32-make, not qmake. At this point I have to guess which Qt library I have to add to the final link process. I’m assuming libqtmaind.a seemed to be fundamental as well as libqt5cored.a. Now the build process is making some progress but still it seems I’m missing some library relating to QUuid and some more.

    One of the few things that I liked of Microsofts MSDN is their library specification for each Windows API function. For example google for “MSDN CreateProcess” and they tell you they put it in Kernel32.lib.

    The question is where I can obtain this kind of basic documentation for Qt? As far as I can see my 5.3.2 Qt Assistant isn’t telling me this.

    I hope there is some piece of documentation about this.

    Best regards,
    Maarten Verhage


  • Lifetime Qt Champion

    Hi,

    The module where the class can be found is at the top of the class documentation page. See QCommandLineParser.

    If you really want to do everything by hand than you should rather take a look at a qmake created Makefile.



  • Thanks for that. I do realize I have to translate the module name “core” in the documentation to “libQt5Core.a” for my static mingw-w64 case.

    I had a look at the qmake generated makefiles and I did realize I also had to specify the mingw-w64 libraries like libuser32.a and libkernel32.a before my example code build fine.

    Okay your development preference might be different but I prefer to continue with self created makefiles to be run with mingw32-make.

    Now we are at this subject title anyway. Do you know if there is any documentation of the dependencies of the Qt libraries themselves like libQt5Core.a? Is there any list what other libraries they potentially can call. I’m also interested where the qwindows and Qt5Platformsupport libraries are for.

    Best regards,
    Maarten Verhage


  • Lifetime Qt Champion

    I might have expressed myself badly. What I meant is that in order to get the information you wanted quicker, taking a look at the Makefiles generated by qmake would likely be faster.

    You'll have to parse Qt's sources and the .pro/.pri files related to the modules you are interested in for the additional libraries/framework.

    Also be aware that by doing everything by hand yourself, you are going to have to keep a tight look on the private parts of Qt because these parts can be modified, re-implemented or removed at any time.

    You are also going to have to implement all the steps like calling moc, rcc, uic and the other tools that might be needed depending on your application architecture.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.