-5

I have a QWebView in which I load a web page. It it possible to get a list of all images that appear on it? I need to select from the list images that appears on the web page me with a box. Is it possible ?
Thanks in advance.
greetings

EDIT:
Here is what I've tried:

void Revision::on_pushButton_6_clicked() 
{ 
  //ui->textEdit->paste(); 
  //ui->textEdit("Hols"); 
  //load(ui->webView->); 
  QString selectedHtml(); 
  QDomAttr imagen; 
  imagen.isElement(); 
  imagen.value(); 
  ui->textEdit->addAction(close()); 
}
Ezee
  • 4,214
  • 1
  • 14
  • 29
  • 1
    `Now I need you to give me a button` -- wrong, that's not how Stack Overflow works. This isn't a "here, have some code" site, you need to show what you've tried so far, and what didn't work. – LittleBobbyTables - Au Revoir Sep 18 '14 at 12:54
  • void Revision::on_pushButton_6_clicked() { //ui->textEdit->paste(); //ui->textEdit("Hols"); //load(ui->webView->); QString selectedHtml(); QDomAttr imagen; imagen.isElement(); imagen.value(); ui->textEdit->addAction(close()); } – Daniel Redondo Sep 18 '14 at 13:02
  • I'm trying that when you press the button appears in the list of images textEdit the website – Daniel Redondo Sep 18 '14 at 13:03

1 Answers1

0

Try something like this to get the image elements:

webView.page()->mainFrame()->findAllElements("img"); 

Where the given string is a search pattern in CSS selector syntax (the one above basically matches all img elements).

Then you can things like extractting the URL of the element and downloading the image or whatever you need.

Silicomancer
  • 8,604
  • 10
  • 63
  • 130