QComboBox 사용법
import sys from PyQt5.QtWidgets import QApplication, QWidget, QComboBox, QLabel, QVBoxLayout from PyQt5.QtCore import Qt class MyApp(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): # 라벨 생성 self.l = QLabel('Option1', self) # 콤보 박스 생성 self.cb = QComboBox(self) # 콤보 아이템 추가 self.cb.addItem('Option1') self.cb.addItem('Option2') self.cb.addItem('Option3') self.cb.addIt..
2022. 10. 16.