Bugreport: QDBusArgument does not work with PyQt6
jakobdev at gmx.de
Thu Jun 30 18:55:42 BST 2022
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.
Am 30.06.22 um 19:32 schrieb Phil Thompson:
> Sorry, I need something much, much simpler to work with.
> Running your example with dbus-monitor running for both PyQt5 and
> PyQt6 shows the same arguments suggesting that the marshalling is
> working the same.
> On 30/06/2022 12:34, JakobDev wrote:
>> It's the QDbusArgument Object that causes the problem. i don't now, if
>> QBytesArray needs to be implementet too in PyQt6, but would be nice if
>> we just could use the normal python bytes.
>> I'm trying to use the PrepareInstall Method of the DynamicLauncher
>> Portal (Documenation:
>> It is pretty new. The doc says, it needs a GIcon, but it needs just
>> the text Icon followed by the Bytes of a Image file. As far as I know
>> KDE 525 is currently the only majror DE that has it impelemented. I
>> have atached a ZIP file which includes all needed files. If you run
>> this code on a system that has the Portal implemented, it should work.
>> If you use PyQt6 instead of PyQt5, it didn't work.
>> KDE has implementet a test of the Portal which uses C++ with Qt5. You
>> can find the source here:
>> The implementation for the GIcon function can be found here:
>> I hope that is all you need to make this work under PyQt6.
>> Gesendet: Donnerstag, 30. Juni 2022 um 12:42 Uhr
>> Von: "Phil Thompson" <phil at riverbankcomputing.com>
>> An: "JakobDev" <jakobdev at gmx.de>
>> Cc: pyqt at riverbankcomputing.com
>> Betreff: Re: Bugreport: QDBusArgument does not work with PyQt6
>> On 29/06/2022 12:48, JakobDev wrote:
>>> If you run the attached code with PyQt5 everything works as
>>> but if you chance the imports from PyQt5 to PyQt6 you get this
>>> QDBusMarshaller: type `PyQt_PyObject' (65729) is not registered with
>>> D-BUS. Use qDBusRegisterMetaType to register it. It looks like PyQt6
>>> doesn't accept QDBusArgument.
>> What is the argument that is causing the problem?
>> While it would be easy enough to register PyQt_PyObject there wouldn't
>> be much point if the other end doesn't know what to do with it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 505 bytes
Desc: not available
More information about the PyQt