# Introduction to Qt - demonstrating QLabel
# by Anthony Vogelaar, Perth Scotland
# rev 0.10  2024-03-31  Initial release

import  os, sys, signal;     os.system('clear')
from    PySide6.QtWidgets   import  QApplication, QLabel
from    PySide6.QtCore      import  Qt

# ================================== GUI =========================================

class GUI(QLabel):

    def __init__(self):
        self.app = QApplication([])
        super().__init__()
        self.setWindowTitle('The Title')
        self.resize(200, 200)                       # size of label AND window
        self.setText('I am a QLabel')
        self.setAlignment(Qt.AlignCenter)
        self.setStyleSheet("font-size: 20px; font-weight: bold; color: red")
        self.show()

# ================================ Main ==========================================
        
# signal.signal(signal.SIGINT, signal.SIG_DFL)        # handle ctrl-c
gui     = GUI()
sys.exit(gui.app.exec())

# ================================= End ==========================================
