Text2 [QML] Toggle Button / 토글 버튼 (1) 폴더 구조├ ─QML/│ ├ ─ qml/│ └ view.qml└ main.py # main.pyimport sysfrom PySide6.QtCore import QUrlfrom PySide6.QtGui import QGuiApplicationfrom PySide6.QtQml import QQmlApplicationEngineif __name__ == "__main__": app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine() engine.load(QUrl("qml/view.qml")) if not engine.rootObjects(): sys.exit(-1) sys.ex.. 2024. 6. 19. [QML] Rectangle 사각형 그리기 QML에서 사각형 폴더 구조├ ─QML/│ ├ ─ qml/│ └ view.qml└ main.py // view.qmlimport QtQuick 2.9import QtQuick.Controls 2.9ApplicationWindow{ visible : true width : 640 height : 480 Rectangle{ id : rect width : 100 height : 100 x : 100 y : 100 color : "lightblue" }} # main.pyimport sysfrom PySide6.QtCore import QUrlfrom PySide6.QtG.. 2024. 6. 17. 이전 1 다음 반응형