aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/manually/bug_841.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/manually/bug_841.py')
-rw-r--r--sources/pyside6/tests/manually/bug_841.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/pyside6/tests/manually/bug_841.py b/sources/pyside6/tests/manually/bug_841.py
index 44edac83c..c3cf10c8b 100644
--- a/sources/pyside6/tests/manually/bug_841.py
+++ b/sources/pyside6/tests/manually/bug_841.py
@@ -31,6 +31,7 @@ import sys
from PySide6.QtGui import QStandardItem, QStandardItemModel
from PySide6.QtWidgets import QMainWindow, QTreeView, QAbstractItemView, QApplication, QMessageBox
+
class Item(QStandardItem):
def __init__(self, text):
super().__init__()
@@ -42,6 +43,7 @@ class Item(QStandardItem):
ret = Item(self.text())
return ret
+
class Project(QStandardItemModel):
def __init__(self):
super().__init__()
@@ -51,6 +53,7 @@ class Project(QStandardItemModel):
self.appendRow(Item("DEF"))
self.appendRow(Item("GHI"))
+
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
@@ -66,6 +69,7 @@ class MainWindow(QMainWindow):
print(e.x(), e.y())
return QMainWindow.mousePressEvent(self, e)
+
def main():
app = QApplication(sys.argv)
w = MainWindow()
@@ -73,5 +77,6 @@ def main():
QMessageBox.information(None, "Info", "Just drag and drop the items.")
sys.exit(app.exec_())
+
if __name__ == "__main__":
main()