#include <QNetworkProxy>#include <QHttp>#include "get_page.h"Get_page::Get_page(){ my_http = new QHttp;/* QObject::connect( my_http, SIGNAL( requestFinished(int,bool) ), this, SLOT( dataDone(int, bool) ) );*/}Get_page::~Get_page(){ delete(my_http);}bool Get_page::request_some_page(){ //my_http->setHost("yandex.ru",80); //my_http->get("/"); return true;}void Get_page::dataDone(int, bool){ //QString tmp_data; //tmp_data = my_http->readAll(); //my_data->setText(tmp_data);}
#ifndef GET_PAGE_H#define GET_PAGE_H#include <QtGui>#include <QtCore>class Get_page //: QObject{//Q_OBJECTpublic: Get_page(); ~Get_page(); bool request_some_page(); QHttp *my_http; QString str1;public slots: void dataDone(int, bool);};#endif // GET_PAGE_H
debug/mainwindow.o(.text+0x156): In function `ZN8Get_pageC2Ev':D:/QT/job/socks/get_page.cpp:6: undefined reference to `vtable for Get_page'debug/mainwindow.o(.text+0x2a4): In function `ZN8Get_pageC1Ev':D:/QT/job/socks/get_page.cpp:6: undefined reference to `vtable for Get_page'debug/mainwindow.o(.text+0x3d6): In function `ZN8Get_pageD2Ev':D:/QT/job/socks/get_page.cpp:17: undefined reference to `vtable for Get_page'debug/mainwindow.o(.text+0x4fa): In function `ZN8Get_pageD1Ev':D:/QT/job/socks/get_page.cpp:17: undefined reference to `vtable for Get_page'debug/mainwindow.o(.text+0x61e): In function `ZN8Get_pageD0Ev':D:/QT/job/socks/get_page.cpp:17: undefined reference to `vtable for Get_page'collect2: ld returned 1 exit statusmingw32-make.exe[1]: *** [debug\socks.exe] Error 1C:\Qt\2009.02\mingw\bin\mingw32-make.exe: *** [debug] Error 2Exited with code 2.Error while building project socksWhen executing build step 'Make'