Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unable to exclude QtCore or QtGui from build

Unable to exclude QtCore or QtGui from build

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Adrian5A Offline
    Adrian5A Offline
    Adrian5
    wrote on last edited by
    #1

    I want to test builds without the above libraries, at least with QtGui, but have had no luck in doing so.
    [code]QT -= core gui[/code]
    ... inside my *.pro file does nothing; the libraries can still be seen linked in the Compile Output pane.

    Is there another way for me to enforce it?

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      Are you trying to build a non-Qt project? If so, open this in Qt Creator: File -> New File or Project... -> Non-Qt Project -> Plain C++ Project.

      All Qt projects require Qt Core.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • Adrian5A Offline
        Adrian5A Offline
        Adrian5
        wrote on last edited by
        #3

        I see, so they're both essential for regular Qt Projects. I had intended to see what not including them does to the memory footprint of the running application, which seems to have balooned for me in 5.4 compared to an earlier version of Qt5 I used.

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          [quote author="Adrian5" date="1422529757"]I see, so they're both essential for regular Qt Projects.[/quote]If you are making a console application, you can do QT -= gui to remove the dependency on Qt GUI. (You cannot do this if you use any GUI classes, of course)

          Qt Core is always required.

          [quote author="Adrian5" date="1422529757"]I had intended to see what not including them does to the memory footprint of the running application, which seems to have balooned for me in 5.4 compared to an earlier version of Qt5 I used.[/quote]Do you mean increased memory with exactly the same code, when you changed versions?

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • Adrian5A Offline
            Adrian5A Offline
            Adrian5
            wrote on last edited by
            #5

            [quote author="JKSH" date="1422539765"]Do you mean increased memory with exactly the same code, when you changed versions?[/quote]
            That's the impression I was under, but now that I tried to reproduce it by linking to various Qt versions down to 5.2.1, I can't observe any discernable difference.

            I talked to some users on IRC and one of them reported that their memory usage from 5.3 to 5.4 increased from about 5.5 to 35MB for a bare QtWidgets project (i.e. empty window). However my memory usage remains around 46MB accross various Qt5 verions, as reported by Massif (54MB in task manager).

            I understand that this number might only increase gradually when putting to use the library's rich feature set, but to me it does make Qt a lot less attractive for writing small GUI based tools, which was my main interest in learning it; i.e. pick what you need, leave the rest.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved