aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/cannon/t3.py
blob: 13bd8f736cc269f55a3f2ca68cf591794cd4ad45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

# PySide6 tutorial 3


import sys

from PySide6.QtGui import QFont
from PySide6.QtWidgets import (QApplication, QPushButton, QWidget)


if __name__ == '__main__':
    app = QApplication(sys.argv)

    window = QWidget()
    window.resize(200, 120)

    quit = QPushButton("Quit", window)
    quit.setFont(QFont("Times", 18, QFont.Bold))
    quit.setGeometry(10, 40, 180, 40)
    quit.clicked.connect(app.quit)

    window.show()
    sys.exit(app.exec())