[Interest] download a file form http

Till Oliver Knoll till.oliver.knoll at gmail.com
Fri Jul 6 16:44:47 CEST 2012

Am 05.07.2012 um 10:03 schrieb Sivan Greenberg <sivan at omniqueue.com>:

> Thanks for all of the replies, how do I then make the MOC step happen
> before everything else in Qt creator or by plainly using qmake?

Sivan, it seems to me that you're stumbling over the most basic steps in developing a Qt application, all of which could've been resolved by reading the docs and spending a fine day or so with the tutorials.

And it takes off course a decent education in programming, plus if you bring along experience in other frameworks you should be able to apply that knowledge to Qt in no time!

I am just saying that because you made the impression to me that you're expecting a given toolkit to quickly make you a wizard - when you're not.

So you've asked how to download a file in a single line (or so I remember). I'll give you a few more:

QNetworkAccessManager *manager = new QNetworkAccessManager(this); 
connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*))); 
And yes, that's taken straight from the Qt docs!

Off courses it doesn't deal with error conditions, aborting/resuming/pausing a download, handle the received data (hint: QFile! Just in case...)...

So if you're unfamiliar with Qt signals/slots (and it seems very likely, given your questions about moc/qmake), there's a chapter about that as well. And while you're at it, read the chapter about qmake as well. The Qt Object Model won't hurt either.

After that, if you have conceptional questions or still stumble over a particular problem, you're welcome to ask.

But don't try to convince people that "rapid prototyping" was the way to go and every toolkit should start implementing "doWhatIMean(iHaveNoClueWhatsoever)" methods. Because for me that had a taste of "I don't want/am unable to learn"!

Best of luck!

p.s. Sorry for the HTML "formatting", my current device doesn't let me otherwise... :/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120706/3b4ca2d2/attachment.html>

More information about the Interest mailing list