Re: [PyQt] QList Specialization Class SIP Error

2010-10-18 Thread Phil Thompson
On Sun, 17 Oct 2010 23:15:37 +0200, James Meyer jam...@lantic.net wrote: Hi Thanks for the reply. Sorry to be a pain, but I'm quite new to SIP. How exactly would I implement this as a mapped type? Do I only need to specify the %ConvertToTypeCode and %ConvertFromTypeCode directives similar

[PyQt] Passing a QWidget* wrapped in a PyCObject from a C++ program?

2010-10-18 Thread Elias Bachaalany
Hello I have a C++ program that creates a QWidget* and can return that to Python. I want to pass that QWidget * to PyQt so that the newly created widgets have this widget as their parent. How to do that? In C++: QWidget *theWidget; PyObject *get_widget() { return

Re: [PyQt] Passing a QWidget* wrapped in a PyCObject from a C++ program?

2010-10-18 Thread Phil Thompson
On Mon, 18 Oct 2010 11:45:07 +0200, Elias Bachaalany lallousz-py...@yahoo.com wrote: Hello I have a C++ program that creates a QWidget* and can return that to Python. I want to pass that QWidget * to PyQt so that the newly created widgets have this widget as their parent. How to do that?

[PyQt] PyQt instances as method defaults eval to bool

2010-10-18 Thread Hans-Peter Jansen
Hi Phil, current sip and PyQt show some issues with PyQt instances, that are used as method defaults, e.g. the usual parent = QtCore.QModelIndex() in Qt's model/view paradigm. Run the itemviews/editabletreemodel.py example, select an item, and try to insert or remove a column. Results in

[PyQt] Compiling PyQt 4 with QT_NAMESPACE=x

2010-10-18 Thread Elias Bachaalany
Hello, I was trying to compile PyQt while using Qt that is configured with a different namespace. The steps to do that: 1. Configure sip with: configure.py DEFINES+=QT_NAMESPACE=x 2. Apply the attached patch (tested with PyQt 4.7.7 and Qt SDK 4.6.3) 3. Configure PyQt with: configure.py

Re: [PyQt] Compiling PyQt 4 with QT_NAMESPACE=x

2010-10-18 Thread Phil Thompson
On Mon, 18 Oct 2010 17:36:51 +0200, Elias Bachaalany lallousz-py...@yahoo.com wrote: Hello, I was trying to compile PyQt while using Qt that is configured with a different namespace. The steps to do that: 1. Configure sip with: configure.py DEFINES+=QT_NAMESPACE=x 2. Apply the

[PyQt] Request for __lshift__ support in QPolygonF for QPointF

2010-10-18 Thread Hans-Peter Jansen
Hi Phil, any deeper reason, why code like this is not supported: import math from PyQt4 import QtCore, QtGui class StarRating(object): # enum EditMode Editable, ReadOnly = range(2) PaintingScaleFactor = 20 def __init__(self, starCount, maxStarCount = 5): self._starCount

[PyQt] Advice requested on MDI Image Viewer with synchronized windows

2010-10-18 Thread TP
I'm trying to write my first PyQt program. I eventually plan on creating an open-source PyQt app that explores the use of various image processing operations (using the Leptonica C library http://www.leptonica.com as the underlying image processing engine). One of my initial goals is to be able