Re: [PyQt] SIP - Managing ownership of objects in a QList

2013-06-27 Thread Matthias Kuhn
I just realized, that this is the PyQt and not the QGIS list. The code mentioned can be found on github [1] If you find another (better) solution, I'll be very happy. The only problem I encountered with the approach taken was that I initially forgot to increase the reference counter to Py_None.

Re: [PyQt] SIP - Managing ownership of objects in a QList

2013-06-27 Thread Matthias Kuhn
Hi Michael, That's pretty much what is done in QgsAttributes (see qgsfeature.sip in the current master branch) Regards, Matthias On Fre 28 Jun 2013 04:07:59 CEST, michael h wrote: > I am attempting to figure out the best way make SIP transfer ownership > of items inside a QList to python. > > B

[PyQt] Drawing on a QFrame

2013-06-27 Thread Phil
Thank you for reading this. I'd like to draw on a QFrame. The following does draw a line but not on the frame, instead the line is drawn on the main window. I've done this years ago with Qt and C++ but I don't remember how I did it. class DrawTest(QtGui.QMainWindow): def __init__(self, p

[PyQt] SIP - Managing ownership of objects in a QList

2013-06-27 Thread michael h
I am attempting to figure out the best way make SIP transfer ownership of items inside a QList to python. By default, the generated code for the method which returns the QList contains this call: sipConvertFromNewType(sipRes,sipType_QList_0101SomeType,NULL); Is there a way to specify the transfe

Re: [PyQt] Installing PyQt 5 on Mac OS X (10.6.8 Snow Leopard)

2013-06-27 Thread William Kyngesburye
PyQt should be picking the spec from SIP (unless PyQt 5 changed that). You can specify the spec when compiling SIP with the option: -p macx-g++ if that doesn't work when compiling PyQt, try: -p macx-llvm It's odd though, even on OS X 10.7, I get macx-g++ as the default for SIP. If PyQt 5 ign

Re: [PyQt] Installing PyQt 5 on Mac OS X (10.6.8 Snow Leopard)

2013-06-27 Thread Anzir Boodoo
William, On 27 Jun 2013, at 15:40, William Kyngesburye wrote: > Xcode on OSX 10.6 doesn't have clang++, all c++ is handled directly in > "clang", though I think the early versions of clang here don't fully support > c++. You're better off with llvm-g++. Xcode added clang++ in later versions >

Re: [PyQt] Installing PyQt 5 on Mac OS X (10.6.8 Snow Leopard)

2013-06-27 Thread William Kyngesburye
Xcode on OSX 10.6 doesn't have clang++, all c++ is handled directly in "clang", though I think the early versions of clang here don't fully support c++. You're better off with llvm-g++. Xcode added clang++ in later versions starting with Lion. You should try to use a different qmake spec, ei

Re: [PyQt] Installing PyQt 5 on Mac OS X (10.6.8 Snow Leopard)

2013-06-27 Thread Anzir Boodoo
Phil, On 25 Jun 2013, at 15:42, Phil Thompson wrote: > On Tue, 25 Jun 2013 15:36:59 +0100, Anzir Boodoo > wrote: >> Hello, >> >> I've been trying to install PyQt 5 on Mac OS X 10.6.8... Phil suggested: > Use the --qmake flag to point to Qt5's qmake. You are probably defaulting > to Qt4's. It

Re: [PyQt] Kled module

2013-06-27 Thread Phil
On 26/06/13 19:47, David Boddie wrote: Just out of interest, was the problem to do with getting PyQt and PyKDE to work together? This example shows how PyKDE widgets, like KLed, and PyQt widgets, like QWidget, can be mixed in an application: Yes, David, that was the problem. Thanks for the ex