[SOLVED]display image through http url
hello, i was trying to display an image through http url to QButton or QLabel..
but i was not getting any positive result .
pls help.. thanks
11 replies
- connect(m_netwManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(slot_netwManagerFinished(QNetworkReply*)));
- m_netwManager->get(request);
the slot:
- {
- qDebug() << "Error in" << reply->url() << ":" << reply->errorString();
- return;
- }
- QPixmap pixmap;
- pixmap.loadFromData(jpegData);
- label->setPixmap(pixmap); // or whatever your labels name is
- }
Took me 20 secs with google to find this [qtforum.org].
release/mainwindow.o:mainwindow.cpp:(.text+0xa1e): undefined reference to `_imp___ZN21QNetworkAccessManagerC1EP7QObject’
release/mainwindow.o:mainwindow.cpp:(.text+0xa75): undefined reference to `_imp___ZN15QNetworkRequestC1ERK4QUrl’
release/mainwindow.o:mainwindow.cpp:(.text+0xa88): undefined reference to `_imp___ZN21QNetworkAccessManager3getERK15QNetworkRequest’
release/mainwindow.o:mainwindow.cpp:(.text+0xa91): undefined reference to `_imp___ZN15QNetworkRequestD1Ev’
release/mainwindow.o:mainwindow.cpp:(.text+0xf1d): undefined reference to `_imp___ZN15QNetworkRequestD1Ev’
release/mainwindow.o:mainwindow.cpp:(.text+0×19aa): undefined reference to `_imp___ZN21QNetworkAccessManagerC1EP7QObject’
release/mainwindow.o:mainwindow.cpp:(.text+0×1a01): undefined reference to `_imp___ZN15QNetworkRequestC1ERK4QUrl’
release/mainwindow.o:mainwindow.cpp:(.text+0×1a14): undefined reference to `_imp___ZN21QNetworkAccessManager3getERK15QNetworkRequest’
release/mainwindow.o:mainwindow.cpp:(.text+0×1a1d): undefined reference to `_imp___ZN15QNetworkRequestD1Ev’
release/mainwindow.o:mainwindow.cpp:(.text+0×1e60): undefined reference to `_imp___ZN15QNetworkRequestD1Ev’
collect2: ld returned 1 exit status
*
this error occured… is there any library i need to include*
****this is my pro file****
- # Add files and directories to ship with the application
- # by adapting the examples below.
- # file1.source = myfile
- # dir1.source = mydir
- DEPLOYMENTFOLDERS = # file1 dir1
- # Avoid auto screen rotation
- #DEFINES += ORIENTATIONLOCK
- # Needs to be defined for Symbian
- #DEFINES += NETWORKACCESS
- QT+= core gui networks
- symbian:TARGET.UID3 = 0xE5E25B16
- LIBS += C:\QtSDK\mingw\lib\libws2_32.a
- # If your application uses the Qt Mobility libraries, uncomment
- # the following lines and add the respective components to the
- # MOBILITY variable.
- # CONFIG += mobility
- # MOBILITY +=
- SOURCES += main.cpp mainwindow.cpp \
- soapClient.cpp \
- soapC.cpp \
- stdsoap2.cpp
- HEADERS += mainwindow.h \
- soapStub.h \
- soapH.h \
- soapBasicHttpBinding_USCOREIClientServiceProxy.h \
- stdsoap2.h
- FORMS += mainwindow.ui
- # Please do not modify the following two lines. Required for deployment.
- include(deployment.pri)
- qtcAddDeployment()
- OTHER_FILES += \
- BasicHttpBinding_USCOREIClientService.nsmap
[EDIT: code formatting, please wrap in @-tags, Volker]
You must log in to post a reply. Not a member yet? Register here!




