[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] Error: QPainter::killPStack: non-empty save/restore stack when end() was called
From:       "Fabio Zadrozny" <fabioz () esss ! com ! br>
Date:       2004-04-20 12:00:02
Message-ID: 200404201200.i3KC0Pv14470 () esss ! com ! br
[Download RAW message or body]

I'm having crashes using PyQt when creating a QApplication, using a
QCheckListItem.RadioButtonController and then doing it again (I do it in
unit-test, so that the QApplication is always 'clean'... ) - If I don't't
use a QCheckListItem.RadioButtonController it doesn't crash...

The code below shows the error (I'm using winXP, python 2.3, qt 3.2.3, pyqt
3.10)

from qt import *


class MainWindow(QWidget):

    def __init__(self):  
        QWidget.__init__(self, None)
        self.layout = QVBoxLayout(self)
        self.treeview = QListView(self)
        
        self.treeview.addColumn('') 
        self.treeview.header().hide()
        self.layout.addWidget(self.treeview)
        
        self.item = QCheckListItem(self.treeview, None, 'controller',
QCheckListItem.RadioButtonController)
    
class TestController(object):
    
    def test(self):
        self.main = MainWindow()
        self.main.show()
        self.main.close()


if __name__ == '__main__':

    _app = QApplication([])        
    t = TestController()
    t.test()
    _app.quit()
    _app = None # necessary, otherwise QApplication doesn't die


    _app = QApplication([])        
    t = TestController()
    
    print 'will crash.....'
    t.test()
    print 'never gets here...'
    
    _app.quit()
    _app = None 


Output:
will crash.....
QPainter::killPStack: non-empty save/restore stack when end() was called

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic