Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem with <QNetworkReply>
Qt 6.12 LTS is out! See what's new in the release blog

Problem with <QNetworkReply>

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 5 Posters 2.7k 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.
  • mrjjM mrjj

    Hi
    Do you have
    QT += network
    in the .pro file ?
    if not, add it and run qmake from the build menu and then try run again

    A Offline
    A Offline
    Achille15
    wrote on last edited by
    #5

    @mrjj thx for your anwser, yup I do have, I've already mentioned it

    Christian EhrlicherC mrjjM 2 Replies Last reply
    0
    • A Achille15

      @mrjj thx for your anwser, yup I do have, I've already mentioned it

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #6

      @Achille15 Please show us your .pro-file

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • A Achille15

        @mrjj thx for your anwser, yup I do have, I've already mentioned it

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #7

        @Achille15
        Ah sorry, i missed that part.
        Also, might be a silly question but you do have
        #include <QNetworkReply> in the file where it complains ?

        A 1 Reply Last reply
        0
        • mrjjM mrjj

          @Achille15
          Ah sorry, i missed that part.
          Also, might be a silly question but you do have
          #include <QNetworkReply> in the file where it complains ?

          A Offline
          A Offline
          Achille15
          wrote on last edited by
          #8

          @mrjj it's ok, I know it's the obvious solution, yes I do have the #include<QNetworkReply>

          mrjjM 1 Reply Last reply
          0
          • A Achille15

            @mrjj it's ok, I know it's the obvious solution, yes I do have the #include<QNetworkReply>

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #9

            @Achille15
            Ok. had to ask :)

            Does it really say "QNetworkReply: No such file or directory" ?

            Then im not really sure what could be wrong.

            Do you have the file ?
            "C:\Qt\5.15.1\msvc2019_64\include\QtNetwork\qnetworkreply.h"

            Christian EhrlicherC A 2 Replies Last reply
            0
            • Christian EhrlicherC Online
              Christian EhrlicherC Online
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #10

              Please post your pro-file.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              A 1 Reply Last reply
              0
              • Christian EhrlicherC Christian Ehrlicher

                Please post your pro-file.

                A Offline
                A Offline
                Achille15
                wrote on last edited by
                #11

                @Christian-Ehrlicher
                #-------------------------------------------------

                Project created by QtCreator 2019-12-29T19:35:37

                #-------------------------------------------------

                QT -= gui
                QT += sql network

                TARGET = cm-lib
                TEMPLATE = lib

                CONFIG += c++14

                DEFINES += CMLIB_LIBRARY

                The following define makes your compiler emit warnings if you use

                any feature of Qt which has been marked as deprecated (the exact warnings

                depend on your compiler). Please consult the documentation of the

                deprecated API in order to know how to port your code away from it.

                DEFINES += QT_DEPRECATED_WARNINGS

                You can also make your code fail to compile if you use deprecated APIs.

                In order to do so, uncomment the following line.

                You can also select to disable deprecated APIs only up to a certain version of Qt.

                #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

                INCLUDEPATH += source

                SOURCES +=
                source/controllers/command-controller.cpp
                source/controllers/database-controller.cpp
                source/controllers/master-controller.cpp
                source/data/data-decorator.cpp
                source/data/datetime-decorator.cpp
                source/data/entity.cpp
                source/data/enumerator-decorator.cpp
                source/data/int-decorator.cpp
                source/data/string-decorator.cpp
                source/framework/command.cpp
                source/models/address.cpp
                source/models/appointment.cpp
                source/models/client-search.cpp
                source/models/client.cpp
                source/models/contact.cpp
                source/networking/network-access-manager.cpp
                source/networking/web-request.cpp

                HEADERS +=
                source/controllers/command-controller.h
                source/controllers/database-controller.h
                source/controllers/master-controller.h
                source/controllers/navigation-controller.h
                source/controllers/i-database-controller.h
                source/data/data-decorator.h
                source/data/datetime-decorator.h
                source/data/entity-collection.h
                source/data/entity.h
                source/data/enumerator-decorator.h
                source/data/int-decorator.h
                source/data/string-decorator.h
                source/framework/command.h
                source/models/address.h
                source/models/appointment.h
                source/models/client-search.h
                source/models/client.h
                source/cm-lib_global.h
                source/models/contact.h
                source/networking/i-network-access-manager.h
                source/networking/i-web-request.h
                source/networking/network-access-manager.h
                source/networking/web-request.h

                include(../qmake-target-platform.pri)
                include(../qmake-destination-path.pri)

                DESTDIR = $$PWD/../binaries/$$DESTINATION_PATH
                OBJECTS_DIR = $$PWD/build/$$DESTINATION_PATH/.obj
                MOC_DIR = $$PWD/build/$$DESTINATION_PATH/.moc
                RCC_DIR = $$PWD/build/$$DESTINATION_PATH/.qrc
                UI_DIR = $$PWD/build/$$DESTINATION_PATH/.ui

                unix {
                target.path = /usr/lib
                INSTALLS += target
                }

                1 Reply Last reply
                0
                • mrjjM mrjj

                  @Achille15
                  Ok. had to ask :)

                  Does it really say "QNetworkReply: No such file or directory" ?

                  Then im not really sure what could be wrong.

                  Do you have the file ?
                  "C:\Qt\5.15.1\msvc2019_64\include\QtNetwork\qnetworkreply.h"

                  Christian EhrlicherC Online
                  Christian EhrlicherC Online
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #12

                  @mrjj said in Problem with <QNetworkReply>:

                  Do you have the file ?
                  "C:\Qt\5.15.1\msvc2019_64\include\QtNetwork\qnetworkreply.h"

                  And the file "C:\Qt\5.15.1\msvc2019_64\include\QtNetwork\QNetworkReply" ?

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  1 Reply Last reply
                  1
                  • mrjjM mrjj

                    @Achille15
                    Ok. had to ask :)

                    Does it really say "QNetworkReply: No such file or directory" ?

                    Then im not really sure what could be wrong.

                    Do you have the file ?
                    "C:\Qt\5.15.1\msvc2019_64\include\QtNetwork\qnetworkreply.h"

                    A Offline
                    A Offline
                    Achille15
                    wrote on last edited by
                    #13

                    @mrjj I am using gcc compiler
                    Sans titre.png

                    1 Reply Last reply
                    0
                    • A Achille15

                      Hello,

                      I've a problem when I build my project I get an error erreur : QNetworkReply: No such file or directory, this problem doesn't show during compilation, however when I click on run the I get this message, and by the way I've already added the network component to the .pro file.

                      B Offline
                      B Offline
                      Bonnie
                      wrote on last edited by Bonnie
                      #14

                      @Achille15 said in Problem with <QNetworkReply>:

                      this problem doesn't show during compilation, however when I click on run the I get this message

                      Since your .pro file shows a lib project, I guess you mean you build the lib project successfully, but have errors in the app project.
                      Your app project still need to add network module if it uses network APIs directly, even if it depends on the lib project that already added that.
                      One possible situation is that although your app project doesn't use the QtNetwork functions, but it uses some header files from your lib project that includes <QNetworkReply>

                      1 Reply Last reply
                      1
                      • A Offline
                        A Offline
                        Achille15
                        wrote on last edited by
                        #15

                        Thank you everyone, I've solved, I changed to qt 5.14.2 and I've found the problem with a another variable, it had nothing to do with QNetworkReply

                        1 Reply Last reply
                        1

                        • Login

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