[Interest] QWebView and Joomla pages
Kai.Koehne at qt.io
Thu Jan 12 11:29:54 CET 2017
> -----Original Message-----
> From: Frank Rueter | OHUfx [mailto:frank at ohufx.com]
> Sent: Thursday, January 12, 2017 9:05 AM
> To: Kai Koehne <Kai.Koehne at qt.io>; interest at qt-project.org
> Subject: Re: [Interest] QWebView and Joomla pages
> Thanks Kai,
> thanks for the quick reply!
> I'd be quite happy to read the CSS files from the server rather than injecting
> locally, but I know little about CSS and the website has a whole bunch that all
> happily cross import things.
Usually the setup is that the CMS links to the CSS from the HTML. That is, the page
Delivered to the web browser contains lines like
<link rel="stylesheet" href="/components/com_jcomments/tpl/default/style.css?v=21" type="text/css" />
<link rel="stylesheet" href="/cache/template/gzip.php?widgetkit-e2f1f3d7-9b14bd45.css" type="text/css" />
This is actually from view-source:http://www.nukepedia.com/gizmos/filter/efibonacciglow. The web browser will then automatically try to download and apply e.g. http://www.nukepedia.com/components/com_jcomments/tpl/default/style.css?v=21 .
I understand that either your CMS is configured wrong, and doesn't include these links, or that you hit a bug in WebEngine where the css for a reason or the other is not fetched, or applied correctly. Can you clarify??
> I have attached the css folder from the website as that will tell you more than
> my ramblings
> If it's possible to simply point QWebView to that online folder and make
> sense of it on the fly, I would be perfectly happy.
See above - it is something that the .html page itself should link to. The QWebEngineSettings::setUserStyleSheetUrl you found is only a fallback, e.g. if you want to tweak the layout of pages you don't have any control over on the server side.
> Otherwise I guess I will have to figure out how to merge all these things into
> a master css.
As I mentioned already, you can also link from a CSS to another CSS by using the @import rule .
More information about the Interest