[Interest] QWebView and Joomla pages

Frank Rueter | OHUfx frank at ohufx.com
Thu Jan 12 09:04:57 CET 2017

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.
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.

Otherwise I guess I will have to figure out how to merge all these 
things into a master css.


On 12/01/17 8:49 PM, Kai Koehne wrote:
>> -----Original Message-----
>> From: Interest [mailto:interest-bounces+kai.koehne=qt.io at qt-project.org]
>> On Behalf Of Frank Rueter | OHUfx
>> Sent: Thursday, January 12, 2017 8:13 AM
>> To: interest at qt-project.org
>> Subject: [Interest] QWebView and Joomla pages
>> Hi all,
> Hi,
>> this may be a long shot but i don't quite know where else to get help:
>> I am trying to use QWebView to display a part of a Joomla page like this one.
>> <http://www.nukepedia.com/gizmos/filter/efibonacciglow>
>> Trouble is that I can't figure out how to deal with the required css files to
>> ensure the widget looks like the browser.
>> Trouble is Joomla is a CMS and there are a bunch of CSS files that are used for
>> any given page, and I don't know if QWebView can deal with that as well?
> Are the CSS files served by the CMS (linked to from the HTML page), or do
> You want to 'inject' them from the client side?
>> Is it possible to make QWebView interpret a chain of CSS files that may all
>> import other ones?
> If the CSS files are delivered as part of the HTML page, then sure, this is
> part of the standard.
>> E.g. could I somehow tell QWebView to load the CSS structures from the
>> online page or do I have to provide  a single css and use it like this?
>>      QWebView()settings().setUserStyleSheetUrl(QUrl.fromLocalFile(cssFile))
>> If the latter is the only way to get QT to utilise css information, then I need to
>> find a way to bake and merge those online css files to generate one that I can
>> use with QT, but maybe QT is cleverer than that?
> I see, so you're after injecting CSS locally, after all ... have you tried creating a master .css file that includes further .css files with the @import rule?
> https://www.w3.org/TR/CSS21/cascade.html#at-import
> Regards
> Kai

-------------- next part --------------
A non-text attachment was scrubbed...
Name: css.zip
Type: application/zip
Size: 29500 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170112/9252d0c8/attachment.zip>

More information about the Interest mailing list