Bugreport: QDBusArgument does not work with PyQt6

JakobDev jakobdev at gmx.de
Fri Jul 1 19:06:59 BST 2022


QDBusVariant(QByteArray(bits)) is needed. If I not use QDBusVariant, the
Icon validation fails for some reason.

Am 01.07.22 um 12:09 schrieb Florian Bruhin:
> Hey,
>
> On Thu, Jun 30, 2022 at 07:55:42PM +0200, JakobDev wrote:
>> This is strange. It crashes with message.setArguments() before it send
>> anything, so there is nothing dbus-monitor could show. I have now
>> attached a simpler code. The line
>> arg.add(QDBusVariant(QByteArray(b"Hello"))) is the culprit. If I comment
>> them out, it doesn't crash.- Also no crash under PyQt5 with this line.
> Have you tried without QDBusVariant(...)? I use:
>
>      image_data = QDBusArgument()
>      image_data.beginStructure()
>      [...]
>      image_data.add(QByteArray(bits))
>      image_data.endStructure()
>
> without any issues on PyQt6 here:
> https://github.com/qutebrowser/qutebrowser/blob/qt6-v2/qutebrowser/browser/webengine/notification.py#L1114
>
> Florian
>


More information about the PyQt mailing list