diff options
author | Paulo Alcantara <pcacjr@zytor.com> | 2012-02-25 20:51:49 -0300 |
---|---|---|
committer | Paulo Alcantara <pcacjr@zytor.com> | 2012-02-25 21:01:07 -0300 |
commit | 797c7b26d1e9c2dc3f7ca9aa48b50c349b732a8b (patch) | |
tree | 791351bd2651ff8906d1b62900769599b5e1dbc4 /tests/QtUiTools/bug_1138.py | |
parent | 5c1472ec04e8796412ef8186cf3d75c7a1740073 (diff) | |
download | pyside-797c7b26d1e9c2dc3f7ca9aa48b50c349b732a8b.tar.gz pyside-797c7b26d1e9c2dc3f7ca9aa48b50c349b732a8b.tar.xz pyside-797c7b26d1e9c2dc3f7ca9aa48b50c349b732a8b.zip |
Fix BUG #1138 - "Subclassing of QUiLoader leads to "Internal C++ objectbug1138
already deleted" exception (again)""
Also avoid the QUILoader object to automatically be set as parent of the
returned object for createAction() and createActionGroup() methods of
the QUiLoader object.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Diffstat (limited to 'tests/QtUiTools/bug_1138.py')
-rw-r--r-- | tests/QtUiTools/bug_1138.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/QtUiTools/bug_1138.py b/tests/QtUiTools/bug_1138.py new file mode 100644 index 0000000..98a2bc4 --- /dev/null +++ b/tests/QtUiTools/bug_1138.py @@ -0,0 +1,19 @@ +from PySide import QtCore, QtGui +from PySide.QtUiTools import QUiLoader +from helper import adjust_filename + +class MyQUiLoader(QUiLoader): + def __init__(self): + super(MyQUiLoader, self).__init__() + + def createLayout(self, *args): + return super(MyQUiLoader, self).createLayout(*args) + +if __name__ == "__main__": + app = QtGui.QApplication([]) + + ui = MyQUiLoader().load(adjust_filename("bug_1138.ui", __file__)) + + label = QtGui.QLabel("test") + ui.verLayout.addWidget(label) + ui.show() |