[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] How to pass the QMemArray<type> object??
From: Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date: 2004-02-26 18:55:56
Message-ID: 200402261855.57491.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]
On Thursday 26 February 2004 09:52, Jacob Abraham wrote:
> Dear Tutors,
> I would like to use this funtion in pyqt and came
> across the following problems.
> void QTable::removeRows ( const QMemArray<int> & rows
> )
>
> 1.
> from qt import QMemArray
> ImportError: cannot import name QMemArray
> 2.
> mylist=[5]
> self.mytable.removeRows(mylist)
>
> QGArray::at: Absolute index 0 out of range
> Segmentation fault
>
> """
> #http://www.riverbankcomputing.co.uk/pyqt/docs/PyQt.html#AEN668
> QMemArray<type> (Qt v3+)
>
> Types based on the QMemArray template are
> automatically converted to and from Python lists of
> the type.
> """
> How do I pass the QMemArray Object to the
> removeRows funtion?
Looks like a bug. Can you apply the attached patch and re-build PyQt.
Phil
["qmemarray.sip.patch" (text/x-diff)]
--- qmemarray.sip.orig 2004-02-26 18:41:20.000000000 +0000
+++ qmemarray.sip 2004-02-26 18:42:49.000000000 +0000
@@ -60,7 +60,7 @@
return 0;
}
- QMemArray<int> *qma = new QMemArray<int>;
+ QMemArray<int> *qma = new QMemArray<int>(PyList_GET_SIZE(sipPy));
PyErr_Clear();
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic