Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个加载网页的 QWebView 对象。我需要将页面中的图片保存到内存中。图片的 URL 是动态的,但它遵循正则表达式。
我如何使用 QWebView 做到这一点?
当然,你不能用QWebView. 但是您可能对 感兴趣QWebFrame::toHtml,使用它可以获取 HTML 中的所有内容。 然后你需要正则表达式来获取图片URL,获取它,最后保存它。解决方案在这里。
QWebView
QWebFrame::toHtml