03.12.2020, 08:44, "Ramakanth Kesireddy" <[email protected]>:
> Question: Is there any API to reference the CSS file from page as the html is
> set dynamically using webview->setHtml() instead of setuserstylesheet?
You can use standard way of loading external CSS in HTML, i.e. <link
rel="stylesheet" type="text/css" ...>
> Does it helps if we use QByteArray instead
> m_webView->settings()->setUserStyleSheetUrl(
> QUrl("data:text/css;charset=utf-8;base64," + css.toBase64())); where css
> being QByteArray object of the stylesheet?
No, that would be worse.
> Question: Where can we view or verify the QWebInspector output after setting
> the below codes in application source?
> QWebPage *page =
> page->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
> QWebInspector *inspector = new QWebInspector;
> inspector->setPage(page);
QWebInspector is a widget which needs to be show by your app, e.g. as a
separate window or inside a layout.
If you are debugging on device you may want to use remote inspector instead.
You need to set _q_webInspectorServerPort property on QWebPage object to
desired port number (int), and connect to that port from your PC using
WebKit-based browser.
--
Regards,
Konstantin
_______________________________________________
webkit-qt mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-qt