Missing qWebEngine(Chromium)Version()

Florian Bruhin me at the-compiler.org
Wed Apr 20 08:45:28 BST 2022


On Tue, Apr 19, 2022 at 03:58:27PM +0100, Phil Thompson wrote:
> 
> On 16/04/2022 13:24, Florian Bruhin wrote:
> > Hey,
> > 
> > In Qt 6.2, qWebEngine(Chromium)Version() getters were added to
> > QtWebEngineCore:
> > https://codereview.qt-project.org/c/qt/qtwebengine/+/333557
> > 
> > It seems like they didn't make it into PyQt so far?
> 
> As far as I can tell they aren't documented.

That seems like an oversight, because the diff does include qdoc-like
strings. I opened an issue: https://bugreports.qt.io/browse/QTBUG-102743

They are at least mentioned in the documentation here:
https://doc.qt.io/qt-6/qtwebengine-overview.html#qt-webengine-core-module

    "The Chromium version can also be read at runtime using the
    qWebEngineChromiumVersion() method, and
    qWebEngineChromiumSecurityPatchVersion() to read the current patch
    level."

qWebEngineVersion() and qWebEngineChromiumVersion() were added in 6.2,
while qWebEngineChromiumSecurityPatchVersion() was added in 6.3.

If the mention above is enough to make them "official", it'd be good to
have them in PyQt too (ideally all three).

For a bit of context, I requested them to be added (via IRC if I
remember correctly), because right now, it's rather difficult to get
that information. If it's needed after QtWebEngine is initialized, it
can be parsed from the user-agent string (which already qualifies as a
hack in my book). If it's needed before that, though, things get... fun:
https://github.com/qutebrowser/qutebrowser/blob/v2.5.0/qutebrowser/misc/elf.py#L20-L60

Florian

-- 
            me at the-compiler.org | https://www.qutebrowser.org 
       https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
       GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
             I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220420/4ca7d2c4/attachment.sig>


More information about the PyQt mailing list