Rebuilding Qt class from sources



  • Hello,
    I want to modify one class let's say QScroller and build it but building the whole Qt from sources takes a long time Is there a way to build a specific module or something like that?


  • Moderators

    @Eligijus Yes, just build the module where that class is.



  • @jsulm So if QScroller files are located in ./qtbase/src/widgets/util
    I need to build qtbase module?
    Or can I build /qtbase/src/widgets if that's the case could you provide an example how to do that?


  • Moderators

    @Eligijus you need to build widgets module.
    To build: use qmake from the Qt you're building for and widgets.pro file. Then just make && make install.



  • Building module worked. I located lowest level of makefile hierachy in my shadow build directory (/home/user/Qt/5.8/t_build/qtbase/src/widgets) and just ran make && make install no need to run qmake.


  • Moderators

    @Eligijus If you already executed qmake before in the same source code tree then, yes, no need to execute it again.


Log in to reply