On Tue, Nov 15, 2011 at 10:33 PM, Vladimir Rutsky
<[email protected]> wrote:
> 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
>

Converted into bug report http://bugs.pyside.org/show_bug.cgi?id=1060
because my example works in PySide 1.0.5 and didn't in 1.0.6 and later
versions.

--
Vladimir Rutsky
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to