PySide6

import sys, os from PyQt5.QtWidgets import QTabWidget, QLabel, QWidget, QVBoxLayout, QApplication, QMessageBox class BaseWindow(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.tabs = QTabWidget() self.tabs.blockSignals(True) #just for not showing the initial message self.tabs.currentChanged.connect(self.onChange) #changed! self.lbl1 = QLabel("Label 1") self...
import sys, os from PyQt5.QtWidgets import * class BaseWindow(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.lbl = QLabel("EXAMPLE") self.btn_1 = QPushButton("QInputDialog") self.btn_1.clicked.connect(self.Input_showDialog) self.btn_2 = QPushButton("QColorDialog") self.btn_2.clicked.connect(self.Color_showDialog) self.btn_3 = QPushButton("QFontDialog") self..
이번에는 QThread 사용법이다. 다른 언어에서도 다 사용하듯 1개의 쓰레드로 모든 기능을 처리한다는 것은 불가능에 가깝다. 특히나 UI가 있다면 더더욱.. (프리징현상 어쩔꺼야...) 그리하여 이번엔 QTthread이다. 정말 간단한 예제이며 QT에서는 QThread말고 QRunnable 등 다른 여러가지 Thread 사용법들이 있다.. 차차 하나씩 알아보고 이번엔 간단한 QThread만 알아보도록 하자 from PySide6.QtCore import * from PySide6.QtWidgets import * import sys import time # 내 돈 balance = 100 # 돈을 1씩 계속 없애는 QThread class Balance_decrease(QThread): # Custom..
주지님
'PySide6' 태그의 글 목록