Fix BUG #1060 - "Subclassing of QUiLoader leads to "Internal C++ object

already deleted" exception"

See http://bugs.pyside.org/show_bug.cgi?id=1060.

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
Paulo Alcantara 2011-12-21 18:51:34 -03:00 • committed by Hugo Parente Lima
commit 98be0df6a5
4 changed files with 44 additions and 5 deletions

View file

@ -0,0 +1,18 @@
''' unit test for BUG #1060 '''
from PySide.QtGui import QApplication
from PySide.QtUiTools import QUiLoader
from helper import adjust_filename
class MyQUiLoader(QUiLoader):
def __init__(self):
super(MyQUiLoader, self).__init__()
def createWidget(self, *args):
return super(MyQUiLoader, self).createWidget(*args)
if __name__ == "__main__":
app = QApplication([])
ui = MyQUiLoader().load(adjust_filename("bug_1060.ui", __file__))
ui.show()