HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
📟
PyQt 5 Lecture
/
🌐
002 PyQt의 레이아웃
🌐

002 PyQt의 레이아웃

  • QtWidgets
    • QBoxLayout
    • QPlainTextDocumentLayout
    • QStackedLayout
    • QFormLayout
    • QGraphicsAnchorLayout
    • QGraphicsGridLayout
    • QGraphicsLayout
    • QGraphicsLayoutItem
    • QGraphicsLinearLayout
    • QGridLayout
    • QHBoxLayout
    • QVBoxLayout
    • QLayout
    • QLayoutItem
  • GUI
    • QPageLayout
    • QTextLayout
 
대부분의 레이아웃 구조는 QWidget에 있습니다.
QWidget - Qt for Python
Introduced in Qt 4.4, alien widgets are widgets unknown to the windowing system. They do not have a native window handle associated with them. This feature significantly speeds up widget painting, resizing, and removes flicker. Should you require the old behavior with native windows, you can choose one of the following options: Use the QT_USE_NATIVE_WINDOWS=1 in your environment.
QWidget - Qt for Python
https://doc.qt.io/qtforpython/PySide2/QtWidgets/QWidget.html
QWidget - Qt for Python
 
예를 들어 QHBoxLayout에 가면 아래처럼, QLayout을 상속받고 있는 것을 볼 수 있습니다.
출처 : https://doc.qt.io/qtforpython/PySide2/QtWidgets/QHBoxLayout.html#qhboxlayout
출처 : https://doc.qt.io/qtforpython/PySide2/QtWidgets/QHBoxLayout.html#qhboxlayout
 
따라서, 레이아웃을 전체적으로 살펴보고 싶다면, QLayout 문서를 참고하세요. 상속하고 있는 레이아웃은 아래와 같습니다.
출처 : https://doc.qt.io/qtforpython/PySide2/QtWidgets/QLayout.html
출처 : https://doc.qt.io/qtforpython/PySide2/QtWidgets/QLayout.html
QLayout - Qt for Python
This layout has to be inserted into another layout before geometry management will work. The layout is set directly as the top-level layout for . There can be only one top-level layout for a widget. It is returned by . PySide2.QtWidgets.QLayout.
QLayout - Qt for Python
https://doc.qt.io/qtforpython/PySide2/QtWidgets/QLayout.html