标签:qt
1、QT QWebengine运行JavaScript获取图片的数量
pView->page()->runJavaScript("document.getElementsByTagName(\"img\").length", []
(QVariant result) {
qDebug() << result.toString();
});或者
struct GetElementCountFunctor {
GetElementCountFunctor(){ }
void operator()(const QVariant &result) {
qDebug() << result.toString();
}
};
pView->page()->runJavaScript("document.getElementsByTagName(\"img\").length", GetElementCountFunctor());本文出自 “IT技术分享” 博客,转载请与作者联系!
标签:qt
原文地址:http://watertoeast.blog.51cto.com/8489855/1785967