프로그램은 열심히 일하고 있어도 사용자는 그걸 알지 못합니다. 그래서 작업이 얼마나 진행되었는지 직관적으로 알기위해서 진행도를 표시합니다. import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QProgressBar from PyQt5.QtCore import QBasicTimer class progressbarApp(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.progressbar = QProgressBar(self) self.progressbar.setGeometry(20,30,100,30) self.btn = Q..
전에 알아본 인풋창을 중류별로 만들어봅니다. 코드가 깁니다.. import sys from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * class lineeditEdit(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): # echo_group self.echo_group = QGroupBox('가입') self.echo_label = QLabel('모드') self.echo_cb = QComboBox() self.echo_cb.addItem('Normal') self.echo_cb.addItem('No Join') s..
텍스트를 입력받아야 옵션값이나 범위설정 등 다양한 기능을 할 수 있습니다. 이번에는 입력받은 텍스트를 그대로 출력하는 기능을 작업하였습니다. import sys from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QLineEdit class lineEditApp(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.lb1 = QLabel(self) self.lb1.move(10,20) qle = QLineEdit(self) qle.move(10,60) qle.textChanged[str].connect(self.onChanged) self.setWind..
콤보박스는 많은 선택지 중에서 하나를 선택할 수 있는 기능입니다. 선택지가 펼쳐지며 사용자가 원하는 것을 고를 수 있습니다. import sys from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QComboBox class comboBoxApp(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.lb1 = QLabel('선택하세요.', self) self.lb1.move(10,20) combo_box = QComboBox(self) combo_box.addItem('떡볶이') combo_box.addItem('순대') combo_box.addItem..