분류 전체보기414 Using the thread pool QApplication 객체에서 .exec() 를 호출하여 시작된 이벤트 루프는 파이썬 코드와 동일한 스레드 내에서 실행됩니다. 이 이벤트 루프를 실행하는 스레드(GUI 스레드)는 호스트 운영 체제와의 모든 창 통신도 처리합니다. 기본적으로 이벤트 루프에 의해 트리거된 모든 실행은 이 스레드 내에서도 동기적으로 실행됩니다. 실제로 이것은 PyQt6 응용 프로그램이 코드에서 무언가를 할 때마다 창 통신 및 GUI 상호 작용이 정지된다는 것을 의미합니다. 수행중인 작업이 간단하고 GUI 루프에 제어를 신속하게 반환하면이 동결은 사용자가 감지 할 수 없습니다. 그러나 큰 파일 열기 / 쓰기, 일부 데이터 다운로드 또는 복잡한 이미지 렌더링과 같이 더 오래 실행되는 작업을 수행해야하는 경우 문제가 발생할 수 있.. 2023. 3. 13. Using Custom Widgets in Qt Designer 2023. 3. 13. Creating Custom Widgets Custom Widgets As we’ve seen, Qt comes with a wide range of widgets built-in, which you can use to build your applications. Even so, sometimes these simple widgets are not enough — maybe you need an input for some custom types, or want to visualize data in a unique way. In Qt you are free to create your own widgets, either from scratch or by combining existing widgets. In this chapter we’ll see .. 2023. 3. 13. Bitmap Graphics in Qt 21. Bitmap Graphics in Qt The first step towards creating custom widgets in PyQt6 is understanding bitmap (pixel-based) graphic operations. All standard widgets draw themselves as bitmaps on a rectangular "canvas" that forms the shape of the widget. Once you understand how this works you can draw any custom widget you like! INFO: Bitmaps are rectangular grids of pixels , where each pixel (and it.. 2023. 3. 13. Querying SQL databases with Qt models databases/tableview.py import os import sys from PyQt6.QtCore import Qt from PyQt6.QtWidgets import QApplication, QMainWindow, QTableView class MainWindow(QMainWindow): def __init__(self): super().__init__() self.table = QTableView() # self.model = ? # self.table.setModel(self.model) self.setCentralWidget(self.table) app = QApplication(sys.argv) window = MainWindow() window.show() app.exec() Con.. 2023. 3. 13. Tabular data in ModelViews, with numpy & pandas 모델이 Qt가 이해할 수있는 형식으로 해당 데이터를 반환하는 한 모든 데이터 소스에서 모델 뷰를 사용할 수 있습니다. Python에서 표 형식 데이터로 작업하면 해당 데이터를 로드하고 작업하는 방법에 대한 여러 가지 가능성이 열립니다. 여기에서는 간단한 중첩 목록 목록으로 시작한 다음 Qt 응용 프로그램을 인기있는 numpy 및 pandas 라이브러리와 통합하는 단계로 이동합니다. 이렇게 하면 데이터 중심 응용 프로그램을 빌드하기 위한 훌륭한 기반이 제공됩니다. Introduction to QTableView QTableView 는 스프레드 시트와 같은 테이블보기로 데이터를 표시하는 Qt 뷰 위젯입니다. 모델 뷰 아키텍처의 모든 위젯과 마찬가지로 이 위젯은 별도의 모델을 사용하여 뷰에 데이터 및 프리젠테.. 2023. 3. 13. The Model View Architecture — Model View Controller https://doc.qt.io/qt-5/model-view-programming.html#model-classes Model View Architecture As you start to build more complex applications with PyQt6 you’ll likely come across issues keeping widgets in sync with your data. Data stored in widgets (e.g. a simple QListWidget) is not easy to manipulate from Python — changes require you to get an item, get the data, and then set it back. The default so.. 2023. 3. 13. Qt Style Sheets (QSS) https://doc.qt.io/qtforpython/overviews/stylesheet-examples.html Qt Style Sheets Examples - Qt for Python Copyright © 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 (https://www.gn doc.qt.io https://github.com/topics/.. 2023. 3. 13. Icons 15. Icons Icons are small pictures which are used to aid navigation or understanding within a user interface. They are commonly found on buttons, either alongside or in place of text, or alongside actions in menus. By using easily recognizable indicators you can make your interface easier to use. In PyQt6 you have a number of different options for how to source and integrate icons into your appl.. 2023. 3. 13. 이전 1 ··· 32 33 34 35 36 37 38 ··· 46 다음