Click here to Skip to main content
13,004,215 members (79,824 online)
Rate this:
Please Sign up or sign in to vote.
See more:
How to include URLDownloadToFile in QT??? How to include the header file for It??
Posted 6-Mar-11 19:25pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Found in a Qt example for a browser plugin[^]:

#include <qt_windows.h>
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The function you're after is in urlmon.h.
You could try it like this:

#include <tchar.h>
#include <urlmon.h>
#include <Wininet.h>
#pragma comment(lib, "urlmon.lib")
#pragma comment(lib,"wininet.lib")
int main()
    HRESULT hr;
    LPCTSTR Url = _T("http://url.."), File = _T("etc...");
    hr = URLDownloadToFile (0, Url, File, 0, 0);
    return 0;

The example above was grabbed from this web site:[^]

Gokulnath007 7-Mar-11 7:23am
No.. there is no urlmon.h header in QT..
Manfred R. Bihy 7-Mar-11 8:19am
You'll just have to see if that library is available for your device. Besides that you explicitely asked for the function URLDownloadToFile and my answer is absolutely correct that it is in urlmon.h.

You have to learn how to make better specifications in your questions. Why not use the QT libraries that are available to you. There are plenty of examples on this site:
sariqkhan 31-Dec-12 8:14am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170627.1 | Last Updated 24 Mar 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100