[PyQt] PyQt hang / debugging symbols

2010-06-26 Thread Luke Campagnola
Hello List, I recently upgraded to PyQt 4.7 (on windows) and my application now hangs up about once per hour. I have been trying to use GDB and the debuggers in Visual Studio and Qt Creator to attach to my hung process and determine where the problem is, but I don't have any debugging symbols for t

[PyQt] debugging symbols

2010-07-28 Thread Luke Campagnola
Howdy, Can anyone tell me how to get debugging symbols for the pyqt windows binaries? I have a few crashes occurring somewhere in QtCore, and so far my current strategy of "hope the bug exists in Linux too" is not working. My searches have turned up very little.. Luke

[PyQt] Segmentation faults

2010-08-05 Thread Luke Campagnola
I believe I have run into a class of bugs in PyQt4. I originally found that QSpinBox.lineEdit() returns a QLineEdit instance which does not maintain its reference count properly after the original QSpinBox is deleted. Thus it is possible to either 1) have uncollectable LineEdits lingering in memory

Re: [PyQt] Segmentation faults

2010-08-05 Thread Luke Campagnola
On Thu, Aug 5, 2010 at 03:43, Phil Thompson wrote: > On Thu, 5 Aug 2010 03:10:50 -0400, Luke Campagnola > > wrote: > > I believe I have run into a class of bugs in PyQt4. I originally found > that > > QSpinBox.lineEdit() returns a QLineEdit instance which does not mainta

Re: [PyQt] Segmentation faults

2010-08-06 Thread Luke Campagnola
On Fri, Aug 6, 2010 at 10:53, Mailing List SVR wrote: > Il giorno gio, 05/08/2010 alle 03.10 -0400, Luke Campagnola ha scritto: > > $ python > > >>> from PyQt4.QtGui import * > > >>> a = QApplication([]) > > >>> s = QSpinBox()

[PyQt] Segfault: QGraphicsView, cyclic references, and threads

2011-03-27 Thread Luke Campagnola
Greetings All-Knowing PyQters, I have a strange bug that's causing segmentation faults in my program. I have identified some of the key contributors to the bug and a workaround, but I would love for someone to explain what causes the crash so I can avoid similar problems in the future. Here are th

[PyQt] QMutex deadlock during QObject destructor

2011-04-15 Thread Luke Campagnola
Hello, I have a multi-threaded application that locks up periodically while drawing graphics. The application is quite large and due to the randomness of the lockup (usually takes between 10 minutes and 10 hours), I have not been able to work out the exact cause. I do believe that all GUI calls ar

Re: [PyQt] QMutex deadlock during QObject destructor

2011-04-16 Thread Luke Campagnola
On Sat, Apr 16, 2011 at 04:22, Phil Thompson wrote: > On Fri, 15 Apr 2011 23:45:15 -0400, Luke Campagnola > wrote: >> Hello, >> >> I have a multi-threaded application that locks up periodically while >> drawing >> graphics. The application is quite larg

[PyQt] Debugging in windows

2011-05-14 Thread Luke Campagnola
Howdy, I have just compiled PyQt 4.8.4 in WinXP using MinGW from the Qt SDK. I configured both sip and PyQt with --debug turned on (but had to modify the makefiles to link against python26 instead of python26_d). My problem right now is that these did not produce importable modules (for instance, I

Re: [PyQt] Need some assistance on QThread

2011-05-15 Thread Luke Campagnola
If you do want to use threading, then I agree with your approach and Emmanuel's suggestions. However, you do not need to use threading at all for this task (in my opinion, you should always avoid using threads if possible). My approach would be: 1) use subprocess.Popen to execute the command 2) us

Re: [PyQt] jpeg plugin not loading

2011-05-30 Thread Luke Campagnola
Hello, I have the same issue as described below and copying qt.conf into c:\python27 solved the problem. This is from a fresh windows install using the 4.8.4 binary installer. Is there some reason this file isn't being copied to its correct location? Luke On Thu, Oct 23, 2008 at 12:16, Phil Thomp

Re: [PyQt] Subclass of QGraphicsObject does not have the correct class name listed in QGraphicsScene.items()

2011-12-05 Thread Luke Campagnola
Howdy Phil, I'm running into this issue where QGraphicsScene.items() does not return the correct python objects if the items are subclassed from QGraphicsObject. Your response to this issue several months ago was: On Fri, May 20, 2011 at 11:46, Phil Thompson wrote: > It's because QGraphicsObject

Re: [PyQt] Subclass of QGraphicsObject does not have the correct class name listed in QGraphicsScene.items()

2011-12-05 Thread Luke Campagnola
tches:", obj is items[0] On Mon, Dec 5, 2011 at 16:33, Phil Thompson wrote: > On Mon, 5 Dec 2011 12:24:57 -0500, Luke Campagnola > > wrote: >> Howdy Phil, >> I'm running into this issue where QGraphicsScene.items() does not >> return the cor

Re: [PyQt] Subclass of QGraphicsObject does not have the correct class name listed in QGraphicsScene.items()

2011-12-07 Thread Luke Campagnola
Great, Thanks Phil! On Wed, Dec 7, 2011 at 07:56, Phil Thompson wrote: > On Mon, 5 Dec 2011 18:01:25 -0500, Luke Campagnola > > wrote: >> How about this: >> >> from PyQt4 import QtCore, QtGui >> import sip >> class GObject(QtGui.QGraphicsObject): >>

[PyQt] multiple inheritance suggestion

2012-04-08 Thread Luke Campagnola
Howdy list, I'm trying to achieve some sort of multiple inheritance with custom classes where each may define its own signals. I understand there are limitations with SIP in this area, but It is not really necessary that QObject be inherited more than once. As an example, consider the standard dia

Re: [PyQt] multiple inheritance suggestion

2012-04-14 Thread Luke Campagnola
On Sat, Apr 14, 2012 at 09:12, Phil Thompson wrote: > On Sun, 8 Apr 2012 22:40:04 -0400, Luke Campagnola > > wrote: > >As an example, consider the standard diamond > > inheritance problem: > > > >A > > /\ > > BC > > \/ &

[PyQt] multiprocessing with QApplication

2012-06-11 Thread Luke Campagnola
Howdy, I am trying to use multiprocessing in a PyQt application to spawn an extra process with its own GUI. The problem I am running into is that the child process seems to be instantiated with a broken QApplication instance that causes the child to crash. If I understand multiprocessing correctly

Re: [PyQt] multiprocessing with QApplication

2012-06-11 Thread Luke Campagnola
Thanks, Kovid! I had no idea multiprocessing uses fork(); this explains everything. It also seems there is no way to get rid of the copied QApplication after forking. There is a patch to allow forkless-multiprocessing on unix, but I think it might be for python 3 only. On Mon, Jun 11, 2012 at 1:15

Re: [PyQt] multiprocessing with QApplication

2012-06-14 Thread Luke Campagnola
On Wed, Jun 13, 2012 at 7:53 AM, Kovid Goyal wrote: > On Mon, Jun 11, 2012 at 01:59:35PM -0400, Luke Campagnola wrote: >> I agree with you about the multiprocessing package--I really only use it >> for the ease of passing python objects between processes. (I use >> multiproce

[PyQt] Various problems with QGraphicsView

2008-05-28 Thread Luke Campagnola
Hello again, I am trying to implement a subclass of QGraphicsView that allows the user to pan its contents by dragging with the middle mouse button and scale by dragging with the right button. for various reasons, I do not wish to use the built-in pan and zoom features in QGraphicsView. I have read

[PyQt] Re: Various problems with QGraphicsView

2008-05-28 Thread Luke Campagnola
And of course I forgot to attach the script. On Thu, May 29, 2008 at 1:21 AM, Luke Campagnola <[EMAIL PROTECTED]> wrote: > Hello again, > I am trying to implement a subclass of QGraphicsView that allows the > user to pan its contents by dragging with the middle mouse button

[PyQt] Various problems with QGraphicsView

2008-06-03 Thread Luke Campagnola
Hello again, I am trying to implement a subclass of QGraphicsView that allows the user to pan its contents by dragging with the middle mouse button and scale by dragging with the right button. for various reasons, I do not wish to use the built-in pan and zoom features in QGraphicsView. I have read

[PyQt] QTreeWidgetItem.addChild() no longer keeping references

2013-03-04 Thread Luke Campagnola
Howdy, I have found that somewhere between 4.8.3 and 4.9.6, calling QTreeWidgetItem.addChild(item) no longer creates a reference to the specified item (or, at least that is my best guess as to what's going on). I noticed this because I often assign custom attributes to these items and found that th

[PyQt] QImage API change

2013-04-07 Thread Luke Campagnola
Hello, It appears that the API for QImage.__init__ changed somewhere between 4.9 and 4.10. In 4.9, I use QImage(int, width, height, format) and in 4.10 I use QImage(sip.voidptr, width, height, format). I would like to include both calls in my code; can you tell me at what version did this change t

[PyQt] Exit crash after creating QGraphicsViews

2013-04-26 Thread Luke Campagnola
Howdy, I am getting an error at exit for the following example: from PyQt4 import QtGui app = QtGui.QApplication([]) v1 = QtGui.QGraphicsView() s1 = QtGui.QGraphicsScene() v1.setScene(s1) v2 = QtGui.QGraphicsView() s2 = QtGui.QGraphicsScene() v2.setScene(s2) The error is this: QPixmap: Must cons

[PyQt] calling QPainter draw methods efficiently

2013-05-04 Thread Luke Campagnola
Hello, Many of QPainter's methods accept arrays of simple classes such as QPoint, QRect, and PixmapFragment (for eaxmple, drawPoints, drawLines, drawPixmapFragments, etc). Currently, it is required to pass lists of wrapped objects to access these methods. This is very inefficient, especially if th

[PyQt] QImage memory leak in 4.10.1

2013-05-23 Thread Luke Campagnola
Howdy, I am using PyQt 4.10.1 (Py2.7-qt4.8.4-x32) on windows XP. It appears that on this system, QImage(sip.voidptr, int, int, format) increases the reference count to the image data object, but does not decrease the refcount after the QImage is collected. Here's an example session, where I am gene

Re: [PyQt] QImage memory leak in 4.10.1

2013-06-18 Thread Luke Campagnola
On Fri, May 24, 2013 at 1:42 PM, Phil Thompson wrote: > On Thu, 23 May 2013 16:21:26 -0400, Luke Campagnola > wrote: > > Howdy, > > I am using PyQt 4.10.1 (Py2.7-qt4.8.4-x32) on windows XP. It appears > that > > on this system, QImage(sip.voidptr, int, int, format)