Re: [PyQt] QtDBus: Calling a method with an Array of Strings signature with Python 3

2011-12-06 Thread Chris Mayo
On 05/12/11 21:31, Phil Thompson wrote: On Mon, 05 Dec 2011 19:12:33 +, Chris Mayo wrote: Try this... arg = QDBusArgument() arg.beginArray(QMetaType.QString) arg.add("") arg.endArray() and pass arg to call(). Doesn't seem to work: device_iface = QtDBus

Re: [PyQt] QtDBus: Calling a method with an Array of Strings signature with Python 3

2011-12-05 Thread Chris Mayo
Try this... arg = QDBusArgument() arg.beginArray(QMetaType.QString) arg.add("") arg.endArray() and pass arg to call(). Doesn't seem to work: device_iface = QtDBus.QDBusInterface('org.freedesktop.UDisks', '/org/freedesktop/UDisks/devices/sr0', 'org.freedesktop.UDisks.Device', bus) a

[PyQt] QtDBus: Calling a method with an Array of Strings signature with Python 3

2011-12-04 Thread Chris Mayo
With Python 2 I can do (where /dev/sr0 is a cdrom): bus = QtDBus.QDBusConnection.systemBus() device_iface = QtDBus.QDBusInterface('org.freedesktop.UDisks', '/org/freedesktop/UDisks/devices/sr0', 'org.freedesktop.UDisks.Device', bus) reply = device_iface.call("DriveEject", QStringList()) But

Re: [PyQt] QtDBus: Unable to convert Array of Object Paths

2011-12-04 Thread Chris Mayo
The only includes at the top of the generated PyQt-x11-gpl-snapshot-4.9-65564eb2fcf4-2.7/QtDBus/sipQtDBusQDBusVariant.cpp are: #include "sipAPIQtDBus.h" #line 241 "/var/tmp/portage/dev-python/PyQt4-4.9_pre20111204/work/PyQt-x11-gpl-snapshot-4.9-65564eb2fcf4-2.7/sip/QtCore/qvariant.sip" #in

Re: [PyQt] QtDBus: Unable to convert Array of Object Paths

2011-12-04 Thread Chris Mayo
No luck with 65564eb2fcf4 either: x86_64-pc-linux-gnu-g++ -c -march=core2 -msse4.1 -ftree-vectorize -O2 -pipe -fPIC -Wall -W -D_REENTRANT -DNDEBUG -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/var/tmp/portage/dev-python/PyQt4-4.9_pre20111204/work/PyQt-x11-gpl

Re: [PyQt] QtDBus: Unable to convert Array of Object Paths

2011-12-04 Thread Chris Mayo
On 04/12/11 05:34, Phil Thompson wrote: On Fri, 02 Dec 2011 17:37:50 +, Chris Mayo wrote: On 02/12/11 01:42, Phil Thompson wrote: On Thu, 01 Dec 2011 20:20:34 +, Chris Mayo wrote: Can't get ee8b9c7eb565 to compile: Generating the C++ source for the QtDBus module... sip:

Re: [PyQt] QtDBus: Unable to convert Array of Object Paths

2011-12-02 Thread Chris Mayo
On 02/12/11 01:42, Phil Thompson wrote: On Thu, 01 Dec 2011 20:20:34 +, Chris Mayo wrote: Can't get ee8b9c7eb565 to compile: Generating the C++ source for the QtDBus module... sip: /var/tmp/portage/dev-python/PyQt4-4.9_pre20111201/work/PyQt-x11-gpl-snapshot-4.9-ee8b9c7eb565-2.

Re: [PyQt] QtDBus: Unable to convert Array of Object Paths

2011-12-01 Thread Chris Mayo
On 30/11/11 16:37, Phil Thompson wrote: On Sun, 27 Nov 2011 12:58:27 +, Chris Mayo wrote: On 27/11/11 12:51, Phil Thompson wrote: On Sun, 27 Nov 2011 12:47:09 +, Chris Mayo wrote: With PyQt-x11-gpl-snapshot-4.9-e8284ed41e49, sip-4.13.1-snapshot-3b44dc2f0efd and: bus

Re: [PyQt] QtDBus: Unable to convert Array of Object Paths

2011-11-27 Thread Chris Mayo
On 27/11/11 12:51, Phil Thompson wrote: On Sun, 27 Nov 2011 12:47:09 +, Chris Mayo wrote: With PyQt-x11-gpl-snapshot-4.9-e8284ed41e49, sip-4.13.1-snapshot-3b44dc2f0efd and: bus = QtDBus.QDBusConnection.systemBus() iface = QtDBus.QDBusInterface('org.freedesktop.UDisks',

[PyQt] QtDBus: Unable to convert Array of Object Paths

2011-11-27 Thread Chris Mayo
With PyQt-x11-gpl-snapshot-4.9-e8284ed41e49, sip-4.13.1-snapshot-3b44dc2f0efd and: bus = QtDBus.QDBusConnection.systemBus() iface = QtDBus.QDBusInterface('org.freedesktop.UDisks', '/org/freedesktop/UDisks', 'org.freedesktop.UDisks', bus) print(iface.call('EnumerateDeviceFiles').argument

Re: [PyQt] QSqlTableModel.submitAll() problems with milliseconds and PostgreSQL time field

2009-08-25 Thread Chris Mayo
Chris Mayo wrote: > If I create a PostgreSQL database 'test' and execute the following: > CREATE TABLE timetest ( t time ); > INSERT INTO timetest VALUES ('0:0:0'); > > > The output is: > 00:00:00.000 > 00:12:34.500 > 00:12:34.000 > > The da

[PyQt] QSqlTableModel.submitAll() problems with milliseconds and PostgreSQL time field

2009-08-23 Thread Chris Mayo
If I create a PostgreSQL database 'test' and execute the following: CREATE TABLE timetest ( t time ); INSERT INTO timetest VALUES ('0:0:0'); run the following Python: from PyQt4.QtCore import * from PyQt4.QtSql import * db = QSqlDatabase.addDatabase("QPSQL") db.setHostName("localhost") db.setDa