PDA

View Full Version : An Ftp Client to work with web browser



thewooferbbk
13th November 2009, 08:56
Hi!

I've created a web browser myself with the help of a WebKit module and it works fine so far, then i want to create a program that will enable a user to download files from the web, actually its an ftp client program but i want to detect the link clicked on the web view if it directs to be downloaded then it downloads!, thing like Mozila firefox has!

Hopeful I'll get ideas on how to do it guys, i don't even have a pattern clue on how to do it yet!

Thanks!...

yogeshgokul
13th November 2009, 09:04
but i want to detect the link clicked on the web view if it directs to be downloaded then it downloads!, thing like Mozila firefox has!.
You need to look into 2 following options.
1.
void QWebPage::unsupportedContent ( QNetworkReply * reply ) [signal]
This signals is emitted when webkit cannot handle a link the user navigated to.
At signal emissions time the meta data of the QNetworkReply reply is available.
Note: This signal is only emitted if the forwardUnsupportedContent property is set to true.

2.
void QWebPage::downloadRequested ( const QNetworkRequest & request ) [signal]
This signal is emitted when the user decides to download a link. The url of the link as well as additional meta-information is contained in request.