Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 26 | 27 | 28 |
29 | 30 |
Tags
- Excel
- 다이어트
- 함수
- ubuntu
- IOS
- PyQt5
- javascript
- GIT
- mssql
- urllib
- node.js
- flutter
- swift
- MySQL
- python
- Linux
- MS-SQL
- 맛집
- 라즈베리파이
- ASP
- PyQt
- 리눅스
- sqlite
- pandas
- tensorflow
- PER
- Unity
- 유니티
- 날짜
- port
Archives
아미(아름다운미소)
Python PyQt5 combobox 예제 본문
Python PyQt5 combobox
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 26 27 28 29 | import sys from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import QMainWindow, QLabel, QGridLayout, QWidget, QComboBox from PyQt5.QtCore import QSize, QRect class ExampleWindow(QMainWindow): def __init__( self ): QMainWindow.__init__( self ) self .setMinimumSize(QSize( 300 , 300 )) self .setWindowTitle( "PyQt5 Combobox example" ) centralWidget = QWidget( self ) self .setCentralWidget(centralWidget) # Create combobox and add items. self .comboBox = QComboBox(centralWidget) self .comboBox.setGeometry(QRect( 40 , 40 , 491 , 31 )) self .comboBox.setObjectName(( "comboBox" )) self .comboBox.addItem( "Python" ) self .comboBox.addItem( "PyQt5" ) self .comboBox.addItem( "combobox" ) self .comboBox.addItem( "Example" ) if __name__ = = "__main__" : app = QtWidgets.QApplication(sys.argv) mainWin = ExampleWindow() mainWin.show() sys.exit( app.exec_() ) |
'랭귀지 > python' 카테고리의 다른 글
PyQt5 메뉴바(QAction 사용) (0) | 2018.11.30 |
---|---|
python 문자열에서 숫자만 제거 (0) | 2018.11.27 |
python 리스트 슬라이싱 (0) | 2018.11.25 |
python json 송수신 (0) | 2018.11.24 |
[python] pyqt5 QTableWidget (0) | 2018.11.23 |
Comments