It seems that a QTextBrowser doesn't use a css stylesheet like a WebEngine does - that is, like an ordinary web browser. You can set some overall styles, somewhat like setting styles on the body element, but apparently you can't set styles on individual kinds of elements.
So proper rendering with VR3/qt6 is going to have to wait until QWebEngine or an equivalent is available with QT6. On Monday, April 12, 2021 at 11:49:24 PM UTC-4 [email protected] wrote: > I was able to get VR3 working with Qt6, but I had to switch to using a > QTextBrowser instead of a QWebEngine, since Qt6 doesn't yet have a > QWebEngine class. These changes work with Qt5 as well, but the result > isn't satisfactory because the QTextBrowser isn't using the css stylesheet > for display. When I export to the browser, the rendering is correct, but > not in the Leo panel. > > I'm wondering if this isn't about stylesheets being in separate files and > the QTextBrowser not finding them. One difference is that with the > QWebEngine, we had > > w.setHtml(s, url_base) > > but with the QTextBrowser, that method does not take a url_base > parameter. Since stylesheet paths are relative paths, without the > url_base, maybe the QTextBrowser can't find them. > > Does someone know how to handle this situation? > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/6469346c-68ba-4c7e-a018-d402356f9152n%40googlegroups.com.
