Results 1 to 4 of 4

Thread: Qt modules

  1. #1
    Join Date
    Apr 2007
    Posts
    46
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Qt modules

    Just wondering:
    Is there any advantage of doing #include <QHttp>, etc.
    instead of doing #include <QtNetwork>?
    Does it load less code into memory or what?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt modules

    Including a header of a single class makes the compilation faster than including all the headers of the whole module. Headers QtCore, QtGui, QtNetwork, etc. are convenience headers that include all headers belonging to the corresponding module.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    ber_44 (29th May 2007)

  4. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Qt modules

    I have another question regarding modules?

    What is the difference between (for instance):

    Qt Code:
    1. #include <QtGui/QAction>
    To copy to clipboard, switch view to plain text mode 

    and

    Qt Code:
    1. #include <QAction>
    To copy to clipboard, switch view to plain text mode 

    Which is right? It seems both includes work fine ...
    Qt 5.3 Opensource & Creator 3.1.2

  5. #4
    Join Date
    Aug 2006
    Posts
    44
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt modules

    Using
    Qt Code:
    1. #include <QAction>
    To copy to clipboard, switch view to plain text mode 
    assumes your include paths point to the .../include/QtGui/ directory, whereas
    Qt Code:
    1. #include <QtGui/QAction>
    To copy to clipboard, switch view to plain text mode 
    requires only that your include path contain the main Qt .../include/ directory.

Similar Threads

  1. Statically linked QtSql modules
    By runderwo in forum Qt Programming
    Replies: 5
    Last Post: 10th September 2007, 22:43
  2. Resources Modules DLL Window problem
    By RHBaum in forum Qt Programming
    Replies: 3
    Last Post: 16th October 2006, 15:54
  3. Qt and Apache modules
    By Matt Smith in forum Qt Programming
    Replies: 2
    Last Post: 22nd February 2006, 11:56

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.