每当我运行此代码时,我都会收到错误说明
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.
我没有填写此错误的含义,因此非常感谢任何帮助
答案 0 :(得分:0)
你在标题中包含了QWebElement吗?
#include <QWebElement>