hello, I found pyqt support code like this:

QDatetime(2011, 1, 4, 17, 31, 31)

and pyside don't have 6 argument init function,
so I create one, attachment is the patch file.
test ok in my computer.
From 7c845ab6105d25d63b3ca5ea5a91cf6177f1f7cc Mon Sep 17 00:00:00 2001
From: linjunhalida <[email protected]>
Date: Tue, 4 Jan 2011 17:50:53 +0800
Subject: [PATCH] add new QDatetime init function with 6 arguments

---
 PySide/QtCore/typesystem_core.xml |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 5ed694c..f10e4cf 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -791,6 +791,13 @@
             %0 = new %TYPE(date, time, Qt::TimeSpec(%8));
         </inject-code>
     </add-function>
+    <add-function signature="QDateTime(int, int, int, int, int, int)">
+        <inject-code class="target" position="beginning">
+            QDate date(%1, %2, %3);
+            QTime time(%4, %5, %6);
+            %0 = new %TYPE(date, time);
+        </inject-code>
+    </add-function>
     <add-function signature="__reduce__" return-type="PyObject*">
         <inject-code class="target" position="beginning">
             <insert-template name="reduce_code">
-- 
1.7.1

_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to