qmake to just generate the <app>_plugin_import.cpp file?



  • Dear Qt experts,

    I've a strong objection to use qmake as the primary make tool for applications that (partially) use Qt. I'm using GCC 5.1.0 with Qt 5.3.2. Currently I'm writing my own makefiles and run them with mingw32-make. You know, I want to have full control over the build process and the qmake generated makefiles are so long I've no chance to fully understand that. And I don't like to be forced to use all these compiler flags.

    Of course I do need to call the moc tool in order to successfully build Qt applications. I'm also willing to call qmake from within my mingw32 makefile to get things done.

    My question is now if I can use qmake to just generate the <app>_plugin_import.cpp file. Preferably without the need of an project *.pro file. Maybe you can show me the command for the Tablet example code: <QT install folder>\qtbase\examples\widgets\widgets\tablet.

    If so, how can I decide which input files are needed to generate the <app>_plugin_import.cpp file.

    Best regards,
    Maarten Verhage



  • I use CMake for Qt development it does NOT use qmake to generate files. You basically need to call three tools

    1. moc : object meta compiler. Creates metadata for Qt.
    2. uic : Converts .ui into GUI code.
    3. rcc: process qrc files for use in Qt.

    There is one more tool that I use when writing QML Plugins.

    • qmlplugindump: generated the required information for QtCreator.

    I don't think there is any autogenerated <app>_plugin_import.cpp . Plugin files have to be written for each case different.


  • Moderators

    @Maarten-Verhage said in qmake to just generate the <app>_plugin_import.cpp file?:

    My question is now if I can use qmake to just generate the <app>_plugin_import.cpp file. Preferably without the need of an project *.pro file.

    Those files should only be created when building statically.
    qmake doesn't work without .pro files.

    You can try to search in the mkspecs folder of your Qt installation if there is any qmake function included during the build process and check on what qmake variables it depends on or maybe even what external tool is called.
    In the worst case this is even implemented in the qmake source code directly.


Log in to reply
 

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