"QT += network" in pro but <QNetworkAccessManager> can't be found! [SOLVED]
Well, the title says it all. Any ideas?
Did you run qmake after you added QT += network in the .pro file?
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
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"
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.
[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.
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.
I see. That's weird!
Anyway, all the best with your project :)