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.
我的 Qt 应用程序在小部件中加载外部 html 页面QWebView。如何定义自己的样式表来呈现页面的内容?是否可以捆绑一个.css文件供 QWebView 提取?
QWebView
.css
您可以使用以下设置加载它QWebView:
QWebView myView; QWebSettings * settings = myView->settings(); QUrl myCssFileURL; settings->setUserStyleSheetUrl(myCssFileURL);