버튼 만들기
from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton
import sys
app = QApplication(sys.argv)
window = QMainWindow()
window.setWindowTitle("push button box")
button = QPushButton()
button.setText("Press me")
window.setCentralWidget(button)
window.show()
app.exec()
결과
The QApplication class manages the GUI application’s control flow and main settings.
The QMainWindow class provides a main application window
The QPushButton widget provides a command button
https://doc.qt.io/qtforpython/PySide6/QtWidgets/QApplication.html#PySide6.QtWidgets.PySide6.QtWidgets.QApplicationoc.qt.io/qt-6/qmainwindow.html
https://doc.qt.io/qtforpython/PySide6/QtWidgets/QMainWindow.html#more
https://doc.qt.io/qtforpython/PySide6/QtWidgets/QPushButton.html
import sys
This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It is always available.
https://docs.python.org/3/library/sys.html
window.setWindowTitle("push button box")
간단하지만 알면 알수록 어려운것 같다.
아래것들은 뭔지(계속 공부가 필요하겠다)
하나하나씩 공부해보자
'Study(매일매일한걸음씩) > Python' 카테고리의 다른 글
[Study] Python, eval,lamda,map (0) | 2023.02.01 |
---|---|
Mini -Project #1-1 3자리 숫자 야구 게임 with openai(좌절) (0) | 2023.01.31 |
#1 python pyside6 qt로 해보기(pyside6-uic.exe 없어서 고생함) (2) | 2023.01.10 |
Mini -Project #1 3자리 숫자 야구 게임 (Ver 1.0) (0) | 2023.01.06 |
PySide6(GUI 환경 python) 이란 (0) | 2022.12.09 |
댓글