PDA

View Full Version : QNetworkAccessManager



cuteatul
8th July 2011, 05:17
Hello friends...

if I am using below written code in console application then what should come in place of this parameter in constructor of QNetworkAccessManager. Although, what is 'this'
mean as a argument in code...........



QNetworkAccessManager *manager = new QNetworkAccessManager(this);


thanks

ChrisW67
8th July 2011, 05:34
Basic C++ knowledge would be helpful: "this" is the this pointer of an object. In this case "this" points at a QObject instance. Qt uses QObject to support signals and memory management amongst other things. You will need at least one QObject derived class in your console application in order to use the networking functionality. Apart from the copious documentation and examples with Qt, there's a partial example in this thread