0

I have a QWebView and inside of it, say there's some comboboxes, radiobuttons or some form.

Showing that website in the QWebView, is there any way to get those information that are checkeds/filled or whatever (The html webpage is mine)?

I'm using Qt for this.

ymoreau
  • 3,402
  • 1
  • 22
  • 60
Patrick Bassut
  • 3,310
  • 5
  • 31
  • 54

1 Answers1

1

You can access to these elements with QWebElement objects :

QWebView myWebView;
QWebPage * webPage = myWebView.page();
QWebFrame * frame = webPage->mainFrame();
QWebElement myElement = frame->documentElement();

myElement can be manipulated just like you can do in JavaScript with the DOM API. For more information about using a QWebElement, you can refer to the QWebElement official documentation : http://qt-project.org/doc/qt-4.8/qwebelement.html

air-dex
  • 4,130
  • 2
  • 25
  • 25