Results 1 to 2 of 2

Thread: Why doesn't qmake automatically include relevant modules in project file?

  1. #1
    Join Date
    Dec 2015
    Posts
    22
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Why doesn't qmake automatically include relevant modules in project file?

    1. I mean, we have to use the #include directive in our code, so why doesn't qmake pick up on that and put them in the project file? Unnecessary pain in the patoot to duplicate that effort, even though it is only a small effort, it can eat up several half-hours doing redundant chores. Isn't that why we use computers in the first place?

    2. Along that line, if we did QT += <every module out there> in every single project file, we'd cover all the bases wouldn't we? What is the downside? Would the final executable be hugely bloated in size or does the compiler only add what is actually used?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Why doesn't qmake automatically include relevant modules in project file?

    qmake can generate a project file from a directory's content, because at this point there is no file yet and thus cannot contain manual entries.
    Once you potentially have to deal with manual code, e.g. compiler/platform specific sections, then it is often no longer possible to find the correct insertion point.

    There would be a lot of code needed for very little gain, adding a module manually is trivial and only happens very rarely during project life time.

    It might be possible to add such functionality to QtCreator though, but I guess nobody has really felt a need for that yet.

    Cheers,
    _

Similar Threads

  1. The header file 'mainwindow.h' doesn't include <QObject>.
    By nhs_0702 in forum Qt Programming
    Replies: 5
    Last Post: 14th May 2010, 17:02
  2. Replies: 5
    Last Post: 30th January 2010, 10:09
  3. Replies: 3
    Last Post: 8th July 2008, 19:37
  4. Replies: 3
    Last Post: 6th February 2008, 12:53
  5. qmake default includes
    By Gopala Krishna in forum Installation and Deployment
    Replies: 5
    Last Post: 17th July 2007, 20:47

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.