[Interest] QWebView and Joomla pages

Kai Koehne Kai.Koehne at qt.io
Thu Jan 12 08:49:00 CET 2017

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

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




More information about the Interest mailing list