Important: Please read the Qt Code of Conduct -

How to automatically generate the required include files in module include folder?

  • I have created a module and on build it generated directories: bin, include, lib, etc.
    bin directory contains .dll files, lib directory contains .lib files, but against expectation the include directory doesn't have the required header files, it only have a directory named after the module which only contains QtModuleNameDepends file and nothing else!
    As this is my first time creating and building a module so I am not even sure if Qt automatically generate/import the required header files to the include directory. Can someone please verify if Qt generates those header files and if yes then what I may be doing wrong that I am not getting those files.

  • Lifetime Qt Champion


    What kind of module are you talking about ?

  • @SGaist It's custom module which I can use in my projects like this: qt += mymodule.
    Everything is built correctly but the include directory which is automatically generated in the build directly doesn't have the required header files of my module which I think should be copied there automatically. As a workaround right now I copy the header files manually into the include directory.

  • Lifetime Qt Champion

    Is the code of your module accessible somewhere ?

  • Lifetime Qt Champion

    @Eager I think that is done by with some magic I don't understand...

  • I found the solution.
    When you run qmake, Qt's perl script "" is called automatically. A fake empty ".git" directory is needed by the script to run and generate required header files in the proper locations successfully.

  • Lifetime Qt Champion

    Great !

    Thank you for the feedback !

Log in to reply