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. Include Files trouble
Forum Updated to NodeBB v4.3 + New Features

Include Files trouble

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 787 Views 2 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.
  • pluxyyP Offline
    pluxyyP Offline
    pluxyy
    wrote on last edited by
    #1

    Hey there,
    I recently started Programming with Qt creator and have a little trouble with the settings.
    I want to include <QCore> and <Qxml> but I get the error message, that the directory couldnt be found.
    So, actually I have a little experience with eclipse and I usually include the include file in the property of the project. Bur in this case I cant found such property. I tried to include via "add lib" by richt clicking the prohect, but it didnt work because I habe to put a Lib file there and I dont know which one.
    I think it is a little problem but huge for me as a beginner. Hope you can help me.
    Btw. What do work is e.g. <QCoreApplication>

    Greetings
    Peter

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @pluxyy said:

      <Qxml>

      Hi and welcome

      did you add the module to the pro file?
      QT += xml
      in .pro file?

      Some includes depends on activation of the module in the project file.

      1 Reply Last reply
      0
      • pluxyyP Offline
        pluxyyP Offline
        pluxyy
        wrote on last edited by
        #3

        Thank you mrjj,
        yes I tried this one too, but it didn't help. Further I set the include path in the pro-File but it didnt help either.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          You got the name wrong, it's #include <QtCore> or #include <QtXml> in any case you really really should avoid using module wide includes. Why ? Because you are going to pull in every other header from the module which will slow down compilation because they will all be parsed.

          As a good habit, you should only include what you use. Nothing more.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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