[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Qt6 WebEngine: QWebEngineScript.ScriptWorldId should be int enum
From:       Florian Bruhin <me () the-compiler ! org>
Date:       2021-08-26 15:25:31
Message-ID: 20210826152531.z3ziq57ryykzotzh () aragog ! localdomain
[Download RAW message or body]


On Thu, Aug 26, 2021 at 05:18:32PM +0200, Florian Bruhin wrote:
> Hi again :D
> 
> It's possible to add +1 to a Qt.ItemDataRole to use user-defined roles:
> 
>     [...]
> 
> But the same isn't possible with QWebEngineScript.ScriptWorldId:
> 
>     [...]

In a related vein, QWebEngineScript.setWorldId takes an int, so this
won't work:

    >>> from PyQt6.QtWebEngineCore import QWebEngineScript
    >>> s = QWebEngineScript()
    >>> s.setWorldId(QWebEngineScript.ScriptWorldId.UserWorld)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: setWorldId(self, int): argument 1 has unexpected type 'ScriptWorldId'

But I suppose a fix for the issue above will fix this too.

Florian

-- 
            me@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/

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic