"PyQt"의 두 판 사이의 차이
DB CAFE
(새 문서: https://opentutorials.org/module/544/4998) |
|||
(같은 사용자의 중간 판 6개는 보이지 않습니다) | |||
1번째 줄: | 1번째 줄: | ||
− | https://opentutorials.org/module/544/4998 | + | 참고 : https://opentutorials.org/module/544/4998 |
+ | == Pyqt5 레퍼런스 == | ||
+ | https://www.riverbankcomputing.com/static/Docs/PyQt5/index.html | ||
+ | |||
+ | # Hello World 화면 만들기 | ||
+ | ## ui화면 만들기 | ||
+ | QT디자이너를 이용하여 윈도우 폼을 생성한후 "xxxx.ui" 파일로 저장 (.ui파일은 xml파일임) | ||
+ | |||
+ | pyuic5 -x xxxx.ui -o xxxx.py | ||
+ | ----- | ||
+ | |||
+ | ### UI 만들기 | ||
+ | <source lang=python> | ||
+ | # coding: utf-8 | ||
+ | |||
+ | import sys | ||
+ | from PyQt5 import QtWidgets | ||
+ | from PyQt5 import uic | ||
+ | |||
+ | class Form(QtWidgets.QDialog): | ||
+ | def __init__(self, parent=None): | ||
+ | QtWidgets.QDialog.__init__(self, parent) | ||
+ | self.ui = uic.loadUi("QT_WIN_01.ui") | ||
+ | self.ui.show() | ||
+ | |||
+ | |||
+ | if __name__ == '__main__': | ||
+ | app = QtWidgets.QApplication(sys.argv) | ||
+ | w = Form() | ||
+ | sys.exit(app.exec()) | ||
+ | </source> | ||
+ | |||
+ | [[Category:python]] |
2020년 3월 5일 (목) 00:06 기준 최신판
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
참고 : https://opentutorials.org/module/544/4998
Pyqt5 레퍼런스[편집]
https://www.riverbankcomputing.com/static/Docs/PyQt5/index.html
- Hello World 화면 만들기
- ui화면 만들기
QT디자이너를 이용하여 윈도우 폼을 생성한후 "xxxx.ui" 파일로 저장 (.ui파일은 xml파일임)
pyuic5 -x xxxx.ui -o xxxx.py
- UI 만들기
# coding: utf-8
import sys
from PyQt5 import QtWidgets
from PyQt5 import uic
class Form(QtWidgets.QDialog):
def __init__(self, parent=None):
QtWidgets.QDialog.__init__(self, parent)
self.ui = uic.loadUi("QT_WIN_01.ui")
self.ui.show()
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
w = Form()
sys.exit(app.exec())