Re: [PyKDE] canvas related segfault

2005-02-10 Thread Phil Thompson
On Thursday 10 February 2005 11:08, Phil Thompson wrote: Hi Phil, there was a nice little qt tile based imaging example published today in the german linux magazine, and I thought, it would be nice to play with in PyQt, thus I converted it. Now it appears, that after loading an image

Re: [PyKDE] QPixmap.grabWidget() damages icons and QFilePreview doesn't work

2005-02-11 Thread Phil Thompson
On Thursday 10 February 2005 5:04 pm, Hans-Peter Jansen wrote: Hi Phil, my next problems are two fold, combined in one script, but it is also a nice tool to adjust the parameter for non ugly disabled icons, and shows the way to plug them into your project. Qt's disabled icons are but ugly,

Re: [PyKDE] PyQt binding for QPieMenu?

2005-02-11 Thread Phil Thompson
On Friday 11 February 2005 6:11 pm, Giovanni Bajo wrote: Hello, are there Python bindings for qtpiemenu (from Trolltech Solutions)? No, none of the Solutions classes are supported. You're the first person to ask. Phil ___ PyKDE mailing list

[PyKDE] ANN: SIP v4.2rc2 Released

2005-02-11 Thread Phil Thompson
SIP v4.2rc2 has been released and is available from the usual place. There are no known outstanding issues. You will need to re-build PyQt, PyKDE etc if you are upgrading from v4.1.1 or earlier. If you are using pyuic generated code then you will need a current PyQt snapshot and re-run pyuic.

Re: [PyKDE] QPixmap.grabWidget() damages icons and QFilePreview doesn't work

2005-02-11 Thread Phil Thompson
On Friday 11 February 2005 7:40 pm, Hans-Peter Jansen wrote: On Friday 11 February 2005 19:29, Phil Thompson wrote: On Thursday 10 February 2005 5:04 pm, Hans-Peter Jansen wrote: It seemed to work fine for me (with enablePreview = 0). Hmm, strange. Thanks for testing. While at it, I

Re: [PyKDE] Problems converting QSQL objects

2005-02-12 Thread Phil Thompson
On Saturday 12 February 2005 2:25 pm, Jorge Luiz Godoy Filho wrote: Hi, I'm running Python User Interface Compiler 3.13 for Qt version 3.3.4 and I'm with problems converting some forms that use QDataBrowsers from the .ui file to a python file. The result isn't compliant with what is

Re: [PyKDE] QPixmap.grabWidget() damages icons and QFilePreview doesn't work

2005-02-13 Thread Phil Thompson
On Saturday 12 February 2005 11:37 pm, Hans-Peter Jansen wrote: On Friday 11 February 2005 23:17, Phil Thompson wrote: On Friday 11 February 2005 7:40 pm, Hans-Peter Jansen wrote: From the QFilePreview docs: This class is an abstract base class which is used to implement widgets

Re: [PyKDE] Re: Problems converting QSQL objects

2005-02-13 Thread Phil Thompson
On Saturday 12 February 2005 4:44 pm, Jorge Luiz Godoy Filho wrote: Phil Thompson wrote: Can you send me a .ui file that demonstrates the problem? Here it is. This is just a silly test case. Should be fixed in tonight's snapshot. Thanks, Phil

Re: [PyKDE] python extension using pyqt: unresolved external symbol

2005-02-15 Thread Phil Thompson
Hi all, I'm trying to create a python-qt extension, but I keep on receiving these types of errors: error LNK2019: unresolved external symbol I'm actually still checking out how to create a pyqt based module. I wrote a class which derives the QPushButton class. I've written the

Re: [PyKDE] QPixmap.grabWidget() damages icons and QFilePreview doesn't work

2005-02-15 Thread Phil Thompson
On Saturday 12 February 2005 11:37 pm, Hans-Peter Jansen wrote: BTW, did you notice the decode problem in the dirview example. Dropping an item somewhere always decodes as an empty list: # currently used: lst = QStringList() QUriDrag.decodeLocalFiles(e,

Re: [PyKDE] qdir example with strange error message

2005-02-15 Thread Phil Thompson
Hi Phil, as promised, here's the qdir example. While functional apart from a few print statements, it issues this message every time, before a pixmap is displayed: TypeError: drawContents() takes exactly 6 arguments (2 given) I haven't been able to reproduce this. Successive pixmap

Re: [PyKDE] sip undefined type

2005-02-16 Thread Phil Thompson
Sirs: I am trying to wrap the xbase c++ library so I can handle ca clipper xbase files from python. (If anyone out there has a better suggestion I am all ears.) When I try to run sip against my wrapper class I get an error similar to the following (different type, same error) sip -c .

[PyKDE] Re: QCustomEvent::QCustomEvent ( Type type, void * data ) constructor no longer supported?

2005-02-16 Thread Phil Thompson
The following code which used to work with PyQt 3.13 does not work with PyQt-commercial-snapshot-20050211: class PorcineEvent(qt.QCustomEvent): StatusChangeType=qt.QEvent.User+10 CommandingChangeType=qt.QEvent.User+11 def __init__(self,type,data):

Re: [PyKDE] ANN: SIP v4.2rc2 Released

2005-02-16 Thread Phil Thompson
On Mon, 14 Feb 2005 17:13:56 - (GMT) Phil Thompson [EMAIL PROTECTED] wrote: Although I haven't done anything specific to fix it, I have been unable to reproduce it with your script. Please try it and let me know. I compiled and installed the latest snapshot of SIP and PyQT

Re: [PyKDE] qApp is a QApplication instance

2005-02-16 Thread Phil Thompson
Hello, from qt import * import sys class A(QApplication): ... pass ... a = A(sys.argv) qApp __main__.qt.QApplication object at 0x007FECC0 a __main__.A object at 0x008035A0 Is this expected / wanted? I had expected to be able to access the Python instance of the application

Re: [PyKDE] qApp is a QApplication instance

2005-02-16 Thread Phil Thompson
Phil Thompson [EMAIL PROTECTED] wrote: Is this expected / wanted? I had expected to be able to access the Python instance of the application through the global qApp, not the QApplication. In Qt, I can down-cast the qApp pointer to my subclass to access my methods, how can I do the same

Re: Re; Re: [PyKDE] sip undefined type

2005-02-17 Thread Phil Thompson
Message: 7 Date: Wed, 16 Feb 2005 09:05:23 - (GMT) From: Phil Thompson [EMAIL PROTECTED] Subject: Re: [PyKDE] sip undefined type To: jim [EMAIL PROTECTED] Cc: pykde@mats.imk.fraunhofer.de Message-ID: [EMAIL PROTECTED] Content-Type: text/plain;charset=iso-8859-1 Sirs: I am

[PyKDE] RE: QCustomEvent::QCustomEvent ( Type type, void * data ) constructor no longer supported?

2005-02-17 Thread Phil Thompson
Group, SLAC GLAST, IT Online, MS 98 Tel:650-926-3376 Fax:650-926-4335 -Original Message- From: Phil Thompson [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 1:45 AM To: Tuvi, Selim Cc: pykde@mats.imk.fraunhofer.de Subject: Re: QCustomEvent::QCustomEvent ( Type type, void

Re: [PyKDE] ANN: SIP v4.2rc2 Released

2005-02-17 Thread Phil Thompson
On Wed, 16 Feb 2005 15:00:52 - (GMT) Phil Thompson [EMAIL PROTECTED] wrote: What version of Qt are you using? There was some talk of the Debian version of Qt leaking memory. I'm using the latest Qt-mt library from Debian unstable, 3.3.3 (3:3.3.3-8). What version are you using? Qt

Re: [PyKDE] ANN: SIP v4.2rc2 Released

2005-02-17 Thread Phil Thompson
On Thu, 17 Feb 2005 09:24:36 - (GMT) Phil Thompson [EMAIL PROTECTED] wrote: Qt 3.3.4 from Trolltech. Ok, maybe this is a problem related to Qt 3.3.3, I will try using Qt 3.3.4. Do you tried the previous test program with Qt 3.3.4? Yes. There where no leaks? I don't think so

[PyKDE] PyQt v4 Roadmap

2005-02-17 Thread Phil Thompson
I've put up a short roadmap for PyQt v4 on the website, and the text is below. Any comments welcome. Phil PyQt v4 will support Qt v4 only. It will not support earlier versions of Qt in the way that PyQt v3 supports Qt v1 to v3. PyQt v3 will continue to be supported. PyQt v4 will require SIP

Re: [PyKDE] PyQt v4 Roadmap

2005-02-17 Thread Phil Thompson
Phil Thompson [EMAIL PROTECTED] wrote: The separate Qt v4 libraries will be wrapped as separate Python modules. The module names will be the same as the corresponding library (eg. QtCore, QtGui) and be grouped as a single Python package called PyQt4. The suggested programming style for new

Re: [PyKDE] ANN: SIP v4.2rc2 Released

2005-02-17 Thread Phil Thompson
On Thu, 17 Feb 2005 12:56:57 - (GMT) Phil Thompson [EMAIL PROTECTED] wrote: Do you tried the previous test program with Qt 3.3.4? Yes. I tried with Qt 3.3.4 and I have the same problem, and every person I know with a Debian distribution and Qt 3.3.3 have the same error, so maybe

Re: [PyKDE] ANN: SIP v4.2rc2 Released

2005-02-18 Thread Phil Thompson
On Thursday 17 February 2005 9:56 pm, Nahuel Greco wrote: On Thu, 17 Feb 2005 17:03:16 - (GMT) Phil Thompson [EMAIL PROTECTED] wrote: Gentoo (x86 and amd64). I didn't run the C++ test - I was refering to the original Python test that Torsten sent me. Ok, I was confused because I

[PyKDE] ANN: PyQt v3.14, SIP v4.2, QScintilla v1.5 Released

2005-02-19 Thread Phil Thompson
PyQt v3.14, SIP v4.2 and QScintilla v1.5 have all been released and are available from the usual places. Please read the note at the end about how enum support has changed. PyQt v3.14 - added support for QScintilla v1.5 - added support for qInstallMsgHandler() - added support for Ulli Berning's

Re: [PyKDE] SIP-4.2 problem

2005-02-20 Thread Phil Thompson
On Sunday 20 February 2005 3:28 am, Gerard Vermeulen wrote: The SIP specification snippet: typedef unsigned char GLubyte;/* 1-byte unsigned */ const GLubyte * gl_error(); produces the following C++ code: static PyObject *func_gl_error(PyObject *,PyObject *sipArgs) { int

Re: [PyKDE] pyuic -embed versions

2005-02-21 Thread Phil Thompson
Are there any recent version compatibility problems with pyuic and embedding image data? I've been seeing some strange behavior between a machine of mine and a machine belonging to a tester of mine. Not as far as I can recall. Phil ___ PyKDE

Re: [PyKDE] PyQt

2005-02-23 Thread Phil Thompson
Hello, I have successfully got PyQt up and running on my SuSE 9.2 machine. I would also like to get it running on my SuSE 8.2 machine as well. However during configure I get the following error message: Do you accept the terms of the license? yes SIP 3.5.75 is being used. An internal

Re: [PyKDE] pyuic

2005-02-24 Thread Phil Thompson
I've been messing around with Python/QT/KDevelop which of course, converts a .ui to a .py file. Is there any work being done to _not_ erase the code in the .py file when redesigning the form? I find it rather frustrating when I make a small change in the .ui and then have to rewrite all of

Re: [PyKDE] problem with exceptions within events

2005-02-24 Thread Phil Thompson
Giovanni Bajo [EMAIL PROTECTED] wrote: I have attached a more practical example, that shows the problem in more detail. Thanks. I would call this a very serious bug. BTW, let me notice that this does *not only* happen with an explicit postEvent() call. Even though I am unable to

Re: [PyKDE] QObject.inherits and queryList (still broken in 4.2?)

2005-02-25 Thread Phil Thompson
Hello, a few days ago I posted a bugreport about the QObject.inherits() not working as expected with SIP/PyQT: http://www.mail-archive.com/pykde@mats.imk.fraunhofer.de/msg04211.html This seems fixed with SIP 4.2 and PyQT 3.14, but sadly queryList() still appears to be broken. from qt

Re: [PyKDE] problem with exceptions within events

2005-02-25 Thread Phil Thompson
Hello, it seems that Python exceptions generated within event handlers do not get propagated correctly. We use a sys.excepthook to abort gracefully with a messagebox from our application, and this seems to work in most cases but not within event handlers. For instance: The old (ie. pre-SIP

Re: [PyKDE] problem with exceptions within events

2005-02-25 Thread Phil Thompson
Phil Thompson [EMAIL PROTECTED] wrote: So, rather than try and deal with the two conflicting requirements (being able to catch as many exceptions as possible, and being able to detect exceptions in exec_loop()) I plan to simply revert to the pre-SIP 4.2 behaviour - unless anybody has any

Re: [PyKDE] problem with exceptions within events

2005-02-25 Thread Phil Thompson
On Friday 25 February 2005 3:33 pm, Ulrich Berning wrote: Phil Thompson schrieb: PyQt or any other extension wrapped with SIP could install an optional exception handler hook, that is called by SIP, indicating how to handle the exception (propagate to caller or use PyErr_Print()). It's

Re: [PyKDE] Using relative paths with SIP configuration

2005-02-26 Thread Phil Thompson
On Monday 21 February 2005 3:49 pm, Giovanni Bajo wrote: Hello, there seems to be a problem in using relative paths with configure.py in SIP 4.2 (probably even before). Assuming SIP source is in /sip, if I configure specifying build as installation directory for everything (-b build -d build

Re: [PyKDE] ANN: SIP v4.2rc2 Released

2005-02-26 Thread Phil Thompson
On Monday 21 February 2005 3:12 pm, Nahuel Greco wrote: On Fri, 18 Feb 2005 23:51:46 + Phil Thompson [EMAIL PROTECTED] wrote: I see the memory leak in the test_py_leak.py, but it's what I would expect given what the script does. Because QDialog has a parent, ownership (ie

Re: [PyKDE] enum problem again

2005-02-28 Thread Phil Thompson
Hi all, I am maintaining a project using PyQt and having a problem with C++ enum. When I pass int values as arguments to where enum is expected, there is a TypeError. For example, the following Python code will cause an error: from qt import * a = QSizePolicy(1,1,0,0,False) -

Re: [PyKDE] pure virtual and operator ()

2005-03-03 Thread Phil Thompson
I'm trying to expose an abstract base class. In my .sip file I have virtual double operator()(double) const = 0; From sip command I get sip -e -g -c . -I /usr/local/share/sip -I /usr/local/share/sip/qtcanvas -I ../../hippodraw/sip \ -t Qt_3_3_0 -t WS_X11

Re: [review] [PyKDE] PyQT module size

2005-03-04 Thread Phil Thompson
I think I'm just going to go with the other users' recommendation of nabbing the latest sip and compiling with some different flags with GCC4 and see if that gets me some quick wins. My mind is too small and fragile to attempt the changes you proposed above without screwing things up or

[PyKDE] PyKDE Snapshot

2005-03-04 Thread Phil Thompson
Jim's latest PyKDE snapshot has now been uploaded to the snapshots directory. Apologies for the delay. Phil ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[PyKDE] ANN: PyQt v3.14.1, SIP v4.2.1, QScintilla v1.5.1 Released

2005-03-06 Thread Phil Thompson
PyQt v3.14.1, SIP v4.2.1 and QScintilla v1.5.1 have been released. These are mainly minor bug fixes - there is no particular need to upgrade. The details are... PyQt: - fixed QObject.queryList() - the static QFileDialog methods now release the GIL - fixed a configure.py problem with relative

Re: [PyKDE] PyQt configure error

2005-03-10 Thread Phil Thompson
Hi I'm trying to update PyQt with the last 3.14.1 version, but the configuration script fails. Is there a way to traceback the error ? (I can't see any log file for this step) There is a flag to configure.py - can't remember what it is - do configure.py -h to find out. Phil

Re: [PyKDE] Strange QColor behavior when passing rgb in constructor.

2005-03-10 Thread Phil Thompson
On Wednesday 09 March 2005 12:16 pm, Truls A. Tangstad wrote: I've been testing and debugging to find a problem in our code where plots just weren't drawn (or rather drawn in white on white background), which I finally tracked down to be the way I used QColor. I assumed that passing a

[PyKDE] PyKDE 20050307 Snapshot

2005-03-10 Thread Phil Thompson
Jim's latest PyKDE 20050307 snapshot has now been uploaded. Phil ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] ANN: PyQt v3.14, SIP v4.2, QScintilla v1.5 Released

2005-03-11 Thread Phil Thompson
On Friday 11 March 2005 6:08 pm, Paul F. Kunz wrote: I ahve the following Python class defined... class Linear ( FunctionBase ) : def __init__ ( self, other = None ) : if other : FunctionBase.__init__( self, other ) print copy

Re: [PyKDE] Re: clone member function deleting object

2005-03-14 Thread Phil Thompson
On Mon, 14 Mar 2005 15:34:04 - (GMT), Phil Thompson [EMAIL PROTECTED] said: On Thu, 3 Mar 2005 09:17:07 - (GMT), Phil Thompson [EMAIL PROTECTED] said: Enabling tracing with SIP, I get the following when I call the clone() member function in C++... FunctionBase * sipFunctionBase

Re: [PyKDE] Re: clone member function deleting object

2005-03-14 Thread Phil Thompson
On Mon, 14 Mar 2005 16:54:49 - (GMT), Phil Thompson [EMAIL PROTECTED] said: You must either keep a reference or transfer ownership to C++ using sip.transfer() - and make sure you call the C++ dtor explicitly at some stage to avoid a memory leak. I'll try sip.transfer(). What you

Re: [PyKDE] Re: clone member function deleting object

2005-03-15 Thread Phil Thompson
On Tue, 15 Mar 2005 09:09:02 - (GMT), Phil Thompson [EMAIL PROTECTED] said: I can't get to the sip documentation pages right now, river-bank.demon.co.uk not responding. I can see from Python that sip.transfer takes two arguments. What are they? It seems to be back now. I

Re: [PyKDE] Re: clone member function deleting object

2005-03-16 Thread Phil Thompson
Using sip.transfer(), as Phil suggested, keeps the destructor of my object created by clone() from being destroyed. However, my object is still not useable as it can't find the Python implemented methods when it is called from C++ after return of clone. Poking around, I found that

Re: [PyKDE] Re: clone member function deleting object

2005-03-16 Thread Phil Thompson
On Wed, 16 Mar 2005 09:42:36 - (GMT), Phil Thompson [EMAIL PROTECTED] said: sipPySelf is the pointer to the Python instance object. It is reset to 0 to show that it has been garbage collected. Unfortunately, as you have found, it means the Python virtual reimplementations can no longer

Re: [PyKDE] Re: clone member function deleting object

2005-03-17 Thread Phil Thompson
On Wed, 16 Mar 2005 14:12:55 - (GMT), Phil Thompson [EMAIL PROTECTED] said: On Wed, 16 Mar 2005 09:42:36 - (GMT), Phil Thompson [EMAIL PROTECTED] said: You use sipTransfer() - but you must call it before the Python object is garbage collected, ie. you must provide

[PyKDE] PyKDE-snapshot20050316 Uploaded

2005-03-17 Thread Phil Thompson
The latest PyKDE snapshot is now in the usual place. Phil ___ PyKDE mailing listPyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Re: [PyKDE] qApp is a QApplication instance

2005-03-21 Thread Phil Thompson
Phil Thompson [EMAIL PROTECTED] wrote: sys.modules['qt'].__dict__['qApp'] = A(sys.argv) ...might do it. You have to make sure that this is done before the other modules that want to use it get imported. Well, I'm trying, but it's almost impossible to do it. By the time the App

Re: [PyKDE] qApp is a QApplication instance

2005-03-21 Thread Phil Thompson
Phil Thompson [EMAIL PROTECTED] wrote: No it isn't - sip.cast() What would the correct syntax would be, then? def pyApp(): import sip return sip.cast(qApp, App) gives me a: SystemError: error return without exception set That's the correct syntax. I assume that you have

Re: [PyKDE] boost::shared_ptr

2005-03-22 Thread Phil Thompson
It would be really nice if Phil would add some form of smart pointer support to SIP. *hint hint* =) I may write something myself eventually, if I can figure out what it should look like. What it should look like is what I've stumbled over before. Phil

Re: [PyKDE] Connections with QWidgetFactory

2005-03-23 Thread Phil Thompson
Hello I have a designer file that defines my app main window (principal.ui). Then using QWidgetFactory the actual window is created: -- def main(args): app=QApplication(args) pyimpl = R() # R is derived from QObject mainWindow =

[PyKDE] Heads Up on SIP Change

2005-03-25 Thread Phil Thompson
The next SIP snapshot includes a side effect that will cause problems for .sip files that don't specify private or protected destructors properly. PyQt and PyKDE are affected. PyQt will be fixed in its next snapshot. Phil ___ PyKDE mailing list

Re: [PyKDE] Abstract annotation and deleting objects

2005-03-25 Thread Phil Thompson
On Thursday 24 March 2005 1:07 am, James Emerton wrote: If a sip specification marks a class with the 'Abstract' annotation, the CLASS_CANNOT_CREATE bit is set. This can also be caused by the inclusion of pure virtual methods. Private pure virtual methods. The effect of the

Re: [PyKDE] pure virtual method called

2005-03-25 Thread Phil Thompson
On Thursday 24 March 2005 7:05 pm, Simon Edwards wrote: Hi all, If I play this this code (see attachment) I quickly run up against a crash or the message pure virtual method called and then a crash. I'm overriding createView(), but my version should right now behave exactly the same as the

Re: [PyKDE] can't install sip using mingw

2005-03-25 Thread Phil Thompson
On Friday 25 March 2005 9:41 am, mrx wrote: Hi! I can't install sip on my windows machine using mingw As output imto cmd.exe, I get: makefile:29: warning: overriding commands for target `.c.o' makefile:26: warning: ignoring old commands for target `.c.o' makefile:30: warning: overriding

Re: [PyKDE] PyQT Memory Leak (new)

2005-03-25 Thread Phil Thompson
On Wednesday 23 March 2005 3:51 pm, Nahuel Greco wrote: Hi, I think that I have found a memory leak in the latest PyQT snapshot. When you create forms, if the form constructor connects their signals, after his destruction a weakref object remains in memory. Note the attached logs:

Re: [PyKDE] pure virtual method called

2005-03-26 Thread Phil Thompson
On Saturday 26 March 2005 9:42 am, Simon Edwards wrote: On Friday 25 March 2005 16:09, Phil Thompson wrote: On Thursday 24 March 2005 7:05 pm, Simon Edwards wrote: Hi all, If I play this this code (see attachment) I quickly run up against a crash or the message pure virtual method

Re: [PyKDE] SIP with debug Qt

2005-04-02 Thread Phil Thompson
On Friday 01 April 2005 11:49 pm, James Emerton wrote: In the interest of not having two different Qt source trees, I perpetrate small hack that creates qt-mtNNNd.dll as the debug version. (I do this by building normally to get a release build, then rerunning configure with -debug -lean

Re: [PyKDE] ListBoxItems are invisible

2005-04-02 Thread Phil Thompson
On Wednesday 30 March 2005 9:38 am, Giovanni Bajo wrote: Jeffrey Barish [EMAIL PROTECTED] wrote: So why don't I see anything with the code as shown? Is there a way to make the text visible when I put it in a QListBoxItem? QListBoxItem is an abstract base class, you should be using

Re: [PyKDE] ListBoxItems are invisible

2005-04-03 Thread Phil Thompson
On Sunday 03 April 2005 4:03 am, John Ridley wrote: --- Phil Thompson [EMAIL PROTECTED] wrote: On Wednesday 30 March 2005 9:38 am, Giovanni Bajo wrote: Jeffrey Barish [EMAIL PROTECTED] wrote: So why don't I see anything with the code as shown? Is there a way to make the text visible

Re: [PyKDE] Bug: QTimer.singleShot segfaults on latest pyqt/sip4 snapshot

2005-04-03 Thread Phil Thompson
On Saturday 02 April 2005 10:24 pm, Nahuel Greco wrote: See the attached file. In the latest snapshot the output is: serverlinux:/tmp# ./test_qtimer_segfault.py QT Version: 3.3.3 PYQT Version: snapshot-20050325 SIP Version: 4.2.1 (snapshot-20050325-302) Creating app..

Re: [PyKDE] Memory leak: Cycles with QObject's doesn't get collected

2005-04-05 Thread Phil Thompson
On Sun, 3 Apr 2005 00:30:23 +0100 Phil Thompson [EMAIL PROTECTED] wrote: That's because SIP has never supported the cyclic garbage collector. That is now fixed and your test script shows no leak. I've also added %GCTraverseCode and %GCClearCode to allow classes that include references

Re: [PyKDE] debian's python-kde3 horribly broken

2005-04-06 Thread Phil Thompson
Hi Thorsten, e.a.; On Tuesday 05 April 2005 19:37, Torsten Marek wrote: just in case somebody didn't notice: Ricardo has uploaded PyKDE 3.11.3 built with sip 4.2.1 and patched work with KDE 3.3.2 to Debian/unstable. Thanks, installs fine, but ... Traceback (most recent call last): File

[PyKDE] Language Overhead: C++ vs Python

2005-04-06 Thread Phil Thompson
I've been meaning to do this for ages - maybe it will be useful for people who are trying to convince management types how unproductive C++ is. Please note, although the comparison here is with Python, I'm sure that similar figures would be obtained for any similar language. From time to time we

Re: [Kde-bindings] Re: [PyKDE] Language Overhead: C++ vs Python

2005-04-06 Thread Phil Thompson
On Apr 6, 2005 2:24 PM, Phil Thompson [EMAIL PROTECTED] wrote: From time to time we get commissioned to develop Python bindings for Qt based widget sets. These often come with examples and part of the work is to port those examples to Python. We then end up with C++ and Python

[PyKDE] UK Python Conference 2005

2005-04-06 Thread Phil Thompson
I'll be attending the UK Python Conference in Oxford on Friday April 22nd if anybody is interested in meeting and discussing anything PyQt. Trolltech are also at the conference. http://www.accu.org/conference/python.html Phil ___ PyKDE mailing list

Re: [PyKDE] qt.QStyle problems on PyQt-snapshot-20050404

2005-04-08 Thread Phil Thompson
On Thursday 07 April 2005 3:15 pm, Ümit Öztosun wrote: Hello, We are using a custom QPushButton derived widget in our application. I tried PyQt-x11-gpl-snapshot-20050404.tar.gz together with sip-snapshot-20050403.tar.gz, and I am getting TypeError: qt.QStyle represents a C++ abstract class

Re: [PyKDE] Bug with super and QObject

2005-04-12 Thread Phil Thompson
Phil Thompson [EMAIL PROTECTED] wrote: It's to do with how SIP implements lazy methods (to save on memory and startup time). super seems to be bypassing the hook (maybe it uses tp_getattro rather than tp_getattr). Should be fixable - I'll have a look. Thanks. Can you elaborate

Re: [PyKDE] QString and + operator

2005-04-14 Thread Phil Thompson
I'm making a requirement for a project I'm working on to work with QString instead of the built-in type as much as possible. Some will obviously complain about this, needing to cast to str() to keep some pythonic spirit for concatenation, augmented assignment, etc. I remember seeing in this

Re: [PyKDE] python lists of QStrings

2005-04-14 Thread Phil Thompson
Hello, I have a problem. I find it useful to build lists of strings in Python and pass them to methods like QListBox.insertStrList. The problem is that if I use Qt's i18n support, I end up with Python lists of QStrings, such as: items = [ self.tr(Foo), self.tr(Bar), self.tr(FooBar) ]

Re: [PyKDE] QObject.queryList() memory leak problem

2005-04-15 Thread Phil Thompson
On Thursday 14 April 2005 4:19 pm, Ümit Öztosun wrote: Hello, When using QObject.queryList() with an inheritsClass parameter [i.e. self.queryList('QWidget')], the objects returned by the query gains an extra reference AFAIU. However, without parameters, it works as expected. The attached

Re: [PyKDE] Bug with super and QObject

2005-04-17 Thread Phil Thompson
On Tuesday 12 April 2005 4:19 pm, Giovanni Bajo wrote: Hello: from qt import * class A(QObject): ... pass ... a=A() super(A, a).emit(foo) Traceback (most recent call last): File stdin, line 1, in ? AttributeError: 'super' object has no attribute 'emit' super(A,

Re: [PyKDE] Leaking in virtual handler

2005-04-23 Thread Phil Thompson
On Wednesday 20 April 2005 10:09 pm, James Emerton wrote: I have found a memory leak owing to how SIP handles virtual methods. If a type conversion is done by sipParseResult(), a new object is allocated but never deleted. I have an interface that returns a QString. If I implement this in

Re: [PyKDE] qApp is a QApplication instance

2005-03-21 Thread Phil Thompson
Phil Thompson [EMAIL PROTECTED] wrote: Is this expected / wanted? I had expected to be able to access the Python instance of the application through the global qApp, not the QApplication. In Qt, I can down-cast the qApp pointer to my subclass to access my methods, how can I do the same

Re: [PyKDE] SIP can generate code with duplicates for the default (any?) constructor

2005-04-23 Thread Phil Thompson
On Friday 22 April 2005 11:14 pm, Gerard Vermeulen wrote: Hi Phil, A SIP specification file like class Klass { public: // The following constructor is part of the C++ interface. Klass(); // I want to add a constructor which takes a Numerical Python // array.

Re: [PyKDE] weird PyQt bug: memory corruption?

2005-04-24 Thread Phil Thompson
On Thursday 21 April 2005 7:09 pm, Giovanni Bajo wrote: Hello, I have found a very weird bug with PyQt, which might be some sort of memory corruption thus hard to reproduce. I'm using Qt 3.3.4, PyQt 3.14.1, SIP 4.2.1, under Windows. This is the minimal snippet (took me two hours to reduce

Re: [PyKDE] exported symbols - all or none?

2005-04-27 Thread Phil Thompson
On Wednesday 27 April 2005 3:30 am, Anthony Heading wrote: On Tue, Apr 26, 2005 at 09:22:31AM +0100, Phil Thompson wrote: Don't do this - it won't work. Modules now build standalone - you do not link them against modules that are imported. Well, it works ok. But am happy to try to do

Re: [PyKDE] exported symbols - all or none?

2005-04-27 Thread Phil Thompson
On Wednesday 27 April 2005 7:40 pm, Anthony Heading wrote: On Wed, Apr 27, 2005 at 08:42:34AM +0100, Phil Thompson wrote: And the bolted on code isn't called from Python? It's not wrapped via SIP. But is it called from Python? If it is then why not use SIP to create a module

Re: [PyKDE] weird PyQt bug: memory corruption?

2005-04-28 Thread Phil Thompson
On Thursday 28 April 2005 2:18 pm, Giovanni Bajo wrote: Ümit Öztosun [EMAIL PROTECTED] wrote: What happens in my full application is an AttributeError while trying to call QScrollView.viewport().setBackgroundMode, because the name does not exit (the object is a QObject instead of a

Re: [PyKDE] protected const method wrappers

2005-04-30 Thread Phil Thompson
On Saturday 30 April 2005 12:17 am, James Emerton wrote: When SIP generates the virtual wrapper classes, protected methods get a public sipProtect_foo() method. These methods do not inherit const-ness from their corresponding protected method. If you have a class where the method signature

Re: [PyKDE] A few minor sip issues

2005-04-30 Thread Phil Thompson
On Friday 29 April 2005 5:04 am, Gerard Vermeulen wrote: Phil, (1) /Abstract/ and protected pure virtual member functions. SIP does not recognize a C++ class as abstract which is abstract only because of a **protected** pure virtual member function. I still need to use the /Abstract/

Re: [PyKDE] SIP_VERSION for snapshots?

2005-05-04 Thread Phil Thompson
On Tuesday 03 May 2005 2:34 pm, Giovanni Bajo wrote: Hello, I just compiled and installed sip-snapshot-20050430. I noticed that SIP_VERSION in sip.pyd is 0x040201, so there seems to be no way for me to detect at runtime the use of the snapshot version. sipconfig has a 'sip_version_str'

Re: [PyKDE] SIP compatibility across compilers

2005-05-06 Thread Phil Thompson
On Friday 06 May 2005 7:21 pm, Claus, Richard wrote: If I use SIP to interface a C/C++ package to Python (all three built with Windows Visual Studio 7.1), and use SIP to interface another package (both built with Cygwin GCC), can both packages reliably be used from the same Python program? So

Re: [PyKDE] Wrapping undocumented function qt_tryAccelEvent?

2005-05-11 Thread Phil Thompson
Hello, today I needed to call qt_tryAccelEvent(), but the function is not wrapped in PyQt, and it is undocumented. I don't know if there is a policy about this, but such functions are actually useful in code production in some corner-case situation. For instance, that function is useful to

Re: [PyKDE] Wrapping undocumented function qt_tryAccelEvent?

2005-05-11 Thread Phil Thompson
Phil Thompson [EMAIL PROTECTED] wrote: today I needed to call qt_tryAccelEvent(), but the function is not wrapped in PyQt, and it is undocumented. I don't know if there is a policy about this, but such functions are actually useful in code production in some corner-case situation

Re: [PyKDE] SIP vs Boost.Python?

2005-05-12 Thread Phil Thompson
Hello, I have an application that I need to both embed and extend Python. The Python portion is actually an existing plotting utility that I’m trying to leverage in a legacy C++/OpenGL application. For extending Python, how does SIP compare to Boost.Python? Will SIP be enhanced to

Re: [PyKDE] Question about PyQt changes

2005-05-13 Thread Phil Thompson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I'm trying to package a PyQt application (Kodos) and it kept crashing with this error: TypeError: argument 1 of QSizePolicy() has an invalid type After googling, I found an explanation of the fix at another app site (Kumula):

Re: [PyKDE] autoAdding buttons to a grid

2005-05-17 Thread Phil Thompson
bgMainLayout.activate() But the items never showup in my buttongroup. Neither you or the QButtonGroup are keeping a reference to the QPushButton so it is getting garbage collected immediately. I need to check the Qt source to see if the QButtonGroup should keep a reference (in

Re: [PyKDE] QIODevice.readBlock must return a tuple

2005-05-19 Thread Phil Thompson
When subclassing QIODevice, I noticed (with a look at qiodevice.sip) that readBlock method must return a tuple with a string. I would expect this method to return a string. But my knowledge of sip/PyQt is not enough to say if it is a bug or not. It's not a bug - it returns a tuple of the

Re: [PyKDE] Help on wrapping a C library

2005-05-24 Thread Phil Thompson
On Monday 23 May 2005 7:38 pm, huaicai wrote: Hi all, I was trying to use SIP to wrap a C library GTS(gnu triangular surface). I am new to the SIP tool, so before wrapping GTS, I am learning to wrap a simple C libary just like the C example(word) in the SIP reference guide. I implemented

Re: [PyKDE] Help on wrapping a C library

2005-05-24 Thread Phil Thompson
On Tuesday 24 May 2005 4:40 pm, Huaicai Mo wrote: -Original Message- From: Phil Thompson [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 24, 2005 3:45 AM To: pykde@mats.imk.fraunhofer.de .. In your implementation of reverse() you are freeing the memory allocated

Re: [PyKDE] Isn't QCvanvas available?

2005-05-27 Thread Phil Thompson
On Friday 27 May 2005 2:17 pm, Sebastian Kügler wrote: Hi, I just stumbled across the an article about creating games with Qt [1] and thought about playing around with it in Python. However, it seems that QCanvas [2],[3] isn't available in pyqt :-( Is integration of it planned or am I

Re: [PyKDE] How to pass structure as a parameter to function

2005-05-27 Thread Phil Thompson
On Wednesday 25 May 2005 11:09 am, jim j wrote: hi, i'm encountering a problem while passing a structure variable as a function parameter from python. We have already generated the corresponding wrapper code using SIP for my C library. In this function one of the parameter is a

Re: [PyKDE] PyQt Applet on Mac

2005-05-28 Thread Phil Thompson
On Saturday 28 May 2005 1:22 pm, Diez B. Roggisch wrote: I have to admit that all the (mac)python is somewhat confusing to an old linux guy like me - in fact I even have a third lib dir, the usual /usr/lib/python2.3/... where my self-compiled extensions like omniorb live. Ok, so I digged

Re: [PyKDE] SIP: assigning None to public variable which is user defined type crashes SIP extensions.

2005-05-28 Thread Phil Thompson
On Saturday 28 May 2005 2:44 pm, Gerard Vermeulen wrote: The SIP extension for class Double { public: Double(double v=0): value(v) {} private: double value; }; class Ball { public: Ball() {}; double weight; Double radius; }; crashes when doing b = Ball()

<    1   2   3   4   5   6   7   8   9   10   >