|
Hey Guys, looks like this thread dead-ended @ http://bugs.pyside.org/show_bug.cgi?id=887 but I'm having similar issues so I thought I'd bring it up. The problem is again related to QGraphicsView and I'm finding it almost impossible to debug. What looks like repetition of the same code on my end ends in the application freezing with one of 3 possible outputs. 1. Nothing at all 2. Traceback (most recent call last): in paintEvent QGraphicsView.paintEvent(self, event) NotImplementedError: pure virtual method 'QGraphicsItem.boundingRect()' not implemented. Traceback (most recent call last): in recomputeBounds self.prepareGeometryChange() NotImplementedError: pure virtual method 'QGraphicsItem.boundingRect()' not implemented.3. QPainter::begin: Paint device returned engine == 0, type: 0 QPainter::setClipRegion: Painter not active At this point I have to manually terminate the app. Weirdly the item in question (self in self.prepareGeometryChange()) does implement boundingRect(). I'd put a test case together but I can't even figure out what the common denominator is. Any thoughts or what it might be or how I might go about debugging this sucker? PySide-1.0.4 qt-4.7.3 Cheers All. On 17/06/11 01:42, Hugo Parente Lima wrote: On Thursday 16 June 2011 08:25:54 Thomas Perl wrote:Hi,2011/6/16 Hugo Parente Lima <[email protected]>:On Wednesday 15 June 2011 16:37:32 Christian Brugger wrote:Right, such check will only slow down the object creation for all objects while it's only useful for broken code, implement such check seems not to be a good idea IMO.[...] Try to resolve the method. If that is not possible (AttributeError) print warning and return dummy object to C++ interface. [...]This is exactly what is done, and the dummy C++ object can cause a lot of undefined behavior to C++ caller as you have seem.I don't remember too well, but wasn't there some discussion about a "pedantic" mode where PySide turns all warnings into errors, which could help in tracking down these problems while still allowing for "normal" code to run fast? If so, could we maybe introduce something like this in 1.1 or is it a 2.x thingie? It would be great for debugging (i.e. "My code does strange things" - "Run PySide in pedantic mode" - "Ah! Here is the exception").It already do this (on git version only ATM) for return type check of virtual functions when these functions were called by C++, the old behavior was just to print the exception, now it throws a warning.Thomas_______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside |
_______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside
