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. "QT += network" in pro but <QNetworkAccessManager> can't be found! [SOLVED]
Qt 6.11 is out! See what's new in the release blog

"QT += network" in pro but <QNetworkAccessManager> can't be found! [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 2.7k 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.
  • A Offline
    A Offline
    amahta
    wrote on last edited by
    #1

    Well, the title says it all. Any ideas?

    Thou shalt programme
    http://www.amin-ahmadi.com

    1 Reply Last reply
    0
    • ZlatomirZ Offline
      ZlatomirZ Offline
      Zlatomir
      wrote on last edited by
      #2

      Did you run qmake after you added QT += network in the .pro file?

      https://forum.qt.io/category/41/romanian

      1 Reply Last reply
      0
      • A Offline
        A Offline
        amahta
        wrote on last edited by
        #3

        Not sure what you mean?!!!
        I have subdirs project with a few dlls and an executable (for GUI)
        one of the dlls uses network module and it is added to pro of that dll, but it still can't find QNetworkAccessManager or any other network module classes

        Thou shalt programme
        http://www.amin-ahmadi.com

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andreyc
          wrote on last edited by
          #4

          After you modified a .pro file you need to run qmake to regenerate the Makefiles.
          If you use qtcreator then right click on a project name ans select "run qmake"

          1 Reply Last reply
          0
          • A Offline
            A Offline
            amahta
            wrote on last edited by
            #5

            bq. After you modified a .pro file you need to run qmake to regenerate the Makefiles.
            If you use qtcreator then right click on a project name ans select “run qmake”

            I already solved it by entering <QtNetwork/QNetworkAccessManager>
            Plus, I don't think you need to run qmake manually in most of the cases. Thanks for helping.

            Thou shalt programme
            http://www.amin-ahmadi.com

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

              [quote author="amahta" date="1392565334"]I don't think you need to run qmake manually in most of the cases.[/quote]I'm glad it works for you now. But for the record, Zlatomir and andreyc gave the correct official solution. Running qmake updates your Makefile to include the correct headers.

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

              1 Reply Last reply
              0
              • A Offline
                A Offline
                amahta
                wrote on last edited by
                #7

                Thanks for the tip JKSH but what I said about running a qmake wasn't just a guess. I tried what andreyc said and it didn't help. Sorry if I forgot to mention this.

                Thou shalt programme
                http://www.amin-ahmadi.com

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

                  I see. That's weird!

                  Anyway, all the best with your project :)

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

                  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