aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/cannon/t2.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/tutorials/cannon/t2.py')
-rw-r--r--examples/widgets/tutorials/cannon/t2.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/widgets/tutorials/cannon/t2.py b/examples/widgets/tutorials/cannon/t2.py
new file mode 100644
index 000000000..d3adba396
--- /dev/null
+++ b/examples/widgets/tutorials/cannon/t2.py
@@ -0,0 +1,23 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+# PySide6 tutorial 2
+
+
+import sys
+
+from PySide6.QtGui import QFont
+from PySide6.QtWidgets import QApplication, QPushButton
+
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+
+ quit = QPushButton("Quit")
+ quit.resize(75, 30)
+ quit.setFont(QFont("Times", 18, QFont.Bold))
+
+ quit.clicked.connect(app.quit)
+
+ quit.show()
+ sys.exit(app.exec())