S
ste
hello,
i want to build a simple script to resize a window of konqueror using
the
dbus protocol. Normally use the python interface, but the problem is
most
general because this operation it is impossible for me also if use
qdbusviewer
and is to complex for me if use dbus-send.
If i use the python interface to set a property with only a value
(example:
'minimumWidth') all is ok with this code
theObject = dbus.SessionBus().getObject('org.kde.konqueror-4561',
'/konqueror/MainWindow_1')
theInterface = (theObject,
dbus_interface='org.freedesktop.DBUS.Properties')
theInterface.Set('com.trolltech.Qt.QWidget', 'minimumWidth', 298)
If i check with qdbusviewer, the value of property 'minimumWidth'
change
correctly.
Try the same operation with 'geometry' property that accept a
parameter
'(iiii)' and receive the exception
org.freedesktop.DBus.Error.InvalidArgs
maybe because i don't know how format the correct parameter.
The same response i have if use as parameter the answer of the same
Get
operation:
value = theInterface.Get('com.trolltech.Qt.QWidget', 'geometry')
theInterface.Set('com.trolltech.Qt.QWidget', 'geometry', value)
thanks for the attention
i want to build a simple script to resize a window of konqueror using
the
dbus protocol. Normally use the python interface, but the problem is
most
general because this operation it is impossible for me also if use
qdbusviewer
and is to complex for me if use dbus-send.
If i use the python interface to set a property with only a value
(example:
'minimumWidth') all is ok with this code
theObject = dbus.SessionBus().getObject('org.kde.konqueror-4561',
'/konqueror/MainWindow_1')
theInterface = (theObject,
dbus_interface='org.freedesktop.DBUS.Properties')
theInterface.Set('com.trolltech.Qt.QWidget', 'minimumWidth', 298)
If i check with qdbusviewer, the value of property 'minimumWidth'
change
correctly.
Try the same operation with 'geometry' property that accept a
parameter
'(iiii)' and receive the exception
org.freedesktop.DBus.Error.InvalidArgs
maybe because i don't know how format the correct parameter.
The same response i have if use as parameter the answer of the same
Get
operation:
value = theInterface.Get('com.trolltech.Qt.QWidget', 'geometry')
theInterface.Set('com.trolltech.Qt.QWidget', 'geometry', value)
thanks for the attention