Qt QDbus Sending Custom Types with QVariant
问题 I'm trying to send a custom class ( "Span" ) inside a QVariant across the Dbus session bus in Qt between 2 simple applications. Span is a simple class that contains 2 double type properties. I have successfully sent and recovered a QVariant containing just a QString across the dbus interface in the same manner I am trying to do below with a QVariant of a custom class. Span contains the following declaration for the QMETATYPE QVariant registration in the class header file: Q_DECLARE_METATYPE