qdbus

Defining Enum custom types for Qt D-Bus introspection

风格不统一 提交于 2020-01-23 02:07:26
问题 I am working with QDBUS which has the custom type as Enum. After googling I found below link which explains marshalling of QDBUS custom types. http://techbase.kde.org/Development/Tutorials/D-Bus/CustomTypes#Adventurous_serialization_of_enumerations This doesnot explain the annotation to be specified in the QTDBUS interospection xml to generate proxy using qdbusxml2cpp. How to add Enum annotations in QTDBUS interospection xml? Please if possible explain with some sample code. 回答1: I found a

QtDbus is not working in Qt5.4.1 on Windows 7

若如初见. 提交于 2020-01-01 17:12:27
问题 When I run the Qt Creator dbus examples, they couldn't run, is there any settings or stuff for working QtDbus module or any prerequistics? for example in chat project: if (!QDBusConnection::sessionBus().isConnected()) { qWarning("Cannot connect to the D-Bus session bus.\n" "Please check your system settings and try again.\n"); return 1; } returns 1 and program terminated. 回答1: Finally I found the solution: For QtDbus module get working, The 3rd party Dbus module must be installed in Windows:

Qt QDbus Sending Custom Types with QVariant

假如想象 提交于 2019-12-13 04:17:44
问题 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

qdbusxml2cpp unknown type

我的梦境 提交于 2019-12-07 05:46:33
问题 While using the qdbusxml2cpp program to convert the following xml to a Qt Class, I am getting this error: qdbusxml2cpp -c ObjectManager -a ObjectManager:ObjectManager.cpp xml/object_manager.xml Got unknown type `a{oa{sa{sv}}}' You should add <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="<type>"/> to the XML description D-Feet description: XML: <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0

qdbusxml2cpp unknown type

我的梦境 提交于 2019-12-05 11:31:18
While using the qdbusxml2cpp program to convert the following xml to a Qt Class, I am getting this error: qdbusxml2cpp -c ObjectManager -a ObjectManager:ObjectManager.cpp xml/object_manager.xml Got unknown type `a{oa{sa{sv}}}' You should add <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="<type>"/> to the XML description D-Feet description: XML: <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg

QtDbus is not working in Qt5.4.1 on Windows 7

血红的双手。 提交于 2019-12-04 18:21:23
When I run the Qt Creator dbus examples, they couldn't run, is there any settings or stuff for working QtDbus module or any prerequistics? for example in chat project: if (!QDBusConnection::sessionBus().isConnected()) { qWarning("Cannot connect to the D-Bus session bus.\n" "Please check your system settings and try again.\n"); return 1; } returns 1 and program terminated. Finally I found the solution: For QtDbus module get working, The 3rd party Dbus module must be installed in Windows: Dbus Windows Installer Download After downloading and installing Dbus, it gets working without any

Defining Enum custom types for Qt D-Bus introspection

坚强是说给别人听的谎言 提交于 2019-12-04 13:48:51
I am working with QDBUS which has the custom type as Enum. After googling I found below link which explains marshalling of QDBUS custom types. http://techbase.kde.org/Development/Tutorials/D-Bus/CustomTypes#Adventurous_serialization_of_enumerations This doesnot explain the annotation to be specified in the QTDBUS interospection xml to generate proxy using qdbusxml2cpp. How to add Enum annotations in QTDBUS interospection xml? Please if possible explain with some sample code. I found a solution for my problem: First create a new header file called enums.h which looks like: #ifndef ENUMS_H

Change konsole tab title from command line and make it persistent?

江枫思渺然 提交于 2019-12-03 12:17:55
How can I change the konsole tab title? By default, it's set to %u : %n , so it always changes automatically. I can set it with: qdbus org.kde.konsole $KONSOLE_DBUS_SESSION setTitle 1 "My Title" But as soon as you run something in the console, it changes back to %u : %n . Of course. I can set it to %w to tell it to set the title to "Window Title set by shell", but later (if I don't explicitly set it), it will be empty. (Every new tab will be empty, unless I set it.) The question is how to make it persistent (or how to switch profile via command line)? I can make another profile in which the

QtService application cannot connect to system bus when running as a service

柔情痞子 提交于 2019-12-01 17:54:25
I have recompiled Qt with integrated dbus for windows. Further, I have implemented a QtService application which registers a service and an object at the system bus as follows: QDBusConnection::systemBus().registerService("com.mycompany.Configuration"); QDBusConnection::systemBus().registerObject("/com/mycompany/Configuration/MySetting", myObject); Now when I am running the service application with the -e parameter (running as regular application) it works fine and both dbus-monitor and qdbus --system show me the registered service and object. However, when I am running the application as a

QtService application cannot connect to system bus when running as a service

独自空忆成欢 提交于 2019-12-01 17:34:19
问题 I have recompiled Qt with integrated dbus for windows. Further, I have implemented a QtService application which registers a service and an object at the system bus as follows: QDBusConnection::systemBus().registerService("com.mycompany.Configuration"); QDBusConnection::systemBus().registerObject("/com/mycompany/Configuration/MySetting", myObject); Now when I am running the service application with the -e parameter (running as regular application) it works fine and both dbus-monitor and qdbus