Whenever I run this code I get an error saying
QWebElement has initializer but has incomplete type

QWebElement t1 = ui->webView->page()->mainFrame()->findFirstElement("#version");
QString value = t1.attribute("value");
qDebug() << "T1 value:" << value;
value = t1.attributeNS(QString::Null(), "value");
qDebug() << "T1 ns value:" << value;
QVariant v = t1.evaluateJavaScript("this.value");
qDebug() << "Javascript value:" << v.toString(); // ok. returns changed text.

I am not filled in on what this error means so any help is much appreciated

有帮助吗?

解决方案

did you include the QWebElement at the header?

#include <QWebElement>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top