Mastering GUI Programming with Python5 1 C++ compiler support : https://en.cppreference.com/w/cpp/compiler_support Create an empty C++ project Open project properties: Alt + Enter Go to Configuration Properties → C/C++ → Language, and set the C++ Language Standard option to Preview - Features from the Latest C++ In the same section, set Enable Experimental C++ Standard Library Modules to Yes (/experimental:module) Go to Configuration P.. 2022. 7. 28. QWidgets QWidget as a top-level window Property Argument type Description windowTitle string The title of the window. windowIcon QIcon The icon for the window. modal Boolean Whether the window is modal. cursor Qt.CursorShape The cursor used when this widget has hovered. windowFlags Qt.WindowFlags How the OS should treat the window (dialog, tooltip, popup). 커서에 대한 인수 유형은 enum(열거 형)의 예입니다. 열거 형은 단순히 named .. 2022. 5. 7. Qt Designer Qt Designer를 사용하면 GUI 구성 요소를 응용 프로그램으로 끌어다 놓고 코드를 전혀 작성하지 않고도 구성 할 수 있습니다. 선택적 도구이지만 prototyping에 유용하고 복잡한 GUI를 직접 코딩하는 것보다 바람직 할 수 있습니다. Qt Designer Manual doc.qt.io Test out Qt Designer: 1. Designer 실행 실행파일 위치 : python 설치 디렉토리\Library\bin\designer.exe 예) C:\envs\win32_py37\Library\bin\designer.exe # 검색창에서 Designer 검색으로 검색 가능 2. MainWindow를 생성으로 프로그램 시작한다. 3. 왼쪽 창에서 기본 위젯을 base widget로 드래그한다. 4.. 2022. 5. 7. 기본 실행 주요 모듈 Alias 설정 import sys from PyQt5 import QtWidgets as qtw from PyQt5 import QtGui as qtg from PyQt5 import QtCore as qtc 기본 실행 Qt는 command line에서 인수를 수신할 수 있으므로 모든 인수를 QApplication 객체에 전달할 수 있습니다. 일반적으로 인수를 그대로 두거나 sys.argv를 전달한다: from PyQt5 import QtWidgets app = QtWidgets.QApplication([]) # application 객체 생성 window = QtWidgets.QWidget(windowTitle='Hello Qt') window.show() app.exec() # 이벤트 루.. 2022. 5. 6. 이전 1 2 다음