diff options
Diffstat (limited to 'sources/pyside6/tests/QtGui/bug_480.py')
-rw-r--r-- | sources/pyside6/tests/QtGui/bug_480.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sources/pyside6/tests/QtGui/bug_480.py b/sources/pyside6/tests/QtGui/bug_480.py index a7c863ba6..39707fb01 100644 --- a/sources/pyside6/tests/QtGui/bug_480.py +++ b/sources/pyside6/tests/QtGui/bug_480.py @@ -35,13 +35,15 @@ sys.path.append(os.fspath(Path(__file__).resolve().parents[1])) from init_paths import init_test_paths init_test_paths(False) -from PySide6 import QtWidgets +from PySide6.QtWidgets import (QApplication, QGridLayout, QLabel, QVBoxLayout, + QWidget) -class BuggyWidget(QtWidgets.QWidget): + +class BuggyWidget(QWidget): def setup(self): - self.verticalLayout = QtWidgets.QVBoxLayout(self) - self.gridLayout = QtWidgets.QGridLayout() - self.lbl = QtWidgets.QLabel(self) + self.verticalLayout = QVBoxLayout(self) + self.gridLayout = QGridLayout() + self.lbl = QLabel(self) self.gridLayout.addWidget(self.lbl, 0, 1, 1, 1) # this cause a segfault during the ownership transfer @@ -49,7 +51,7 @@ class BuggyWidget(QtWidgets.QWidget): class LayoutTransferOwnerShip(unittest.TestCase): def testBug(self): - app = QtWidgets.QApplication([]) + app = QApplication([]) w = BuggyWidget() w.setup() w.show() |