Hello! I'm trying to overload methods of QUiLoader but it leads to exception. Here is example:
from PySide.QtGui import QApplication, QDialog
from PySide.QtUiTools import QUiLoader
class MyQUiLoader(QUiLoader):
def __init__(self):
super(MyQUiLoader, self).__init__()
def createWidget(self, *args):
return super(MyQUiLoader, self).createWidget(*args)
def hello():
print "Hello!"
qapp = QApplication([])
#ui = QUiLoader().load(u"test.ui") # this succeeds
ui = MyQUiLoader().load(u"test.ui") # this fails
# Using of MyQUiLoader leads to exception here:
ui.rejected.connect(hello)
# Traceback (most recent call last):
# File "load_ui_test.py", line 20, in <module>
# ui.rejected.connect(hello)
#RuntimeError: Internal C++ object (PySide.QtGui.QDialog) already deleted.
ui.show()
qapp.exec_()
test.ui contains QDialog without any child widgets.
I'm using Windows 7 with Python 2.6, exception emerged in PySide 1.0.7
and with the latest version from git repository.
What is wrong with that code and what can I do to fix it?
Thanks in advance,
Vladimir Rutsky
load_ui_test.py
Description: Binary data
test.ui
Description: Binary data
_______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside
