Layouting::Layout Class
class Layouting::Layout레이아웃 빌더 클래스의 기본 클래스입니다. 더 보기...
| Header: | #include <Layout> |
| Inherits: | Layouting::Object |
| Inherited By: | Layouting::Column, Layouting::Flow, Layouting::Form, Layouting::Grid, and Layouting::Row |
공개 함수
| void | addItem(Layouting::Layout::I item) |
| void | addItems(std::initializer_list<Layouting::Layout::I> items) |
| void | addRow(std::initializer_list<Layouting::Layout::I> items) |
| void | align(Qt::Alignment alignment) |
| void | attachTo(QWidget *widget) |
| QWidget * | emerge() const |
| void | flush() |
| void | setNoMargins() |
| void | setNormalMargins() |
| void | span(int cols, int rows) |
상세 설명
QLayout 에서 파생된 객체를 감쌉니다. 인스턴스는 일시적입니다: 생성, 구성을 마친 후 attachTo() 또는 emerge()를 호출하십시오. 인스턴스를 감싸고 있는 함수 외부에서는 저장하지 마십시오.
하위 클래스는 addItem(), addItems() 및 addRow()를 통해 항목을 축적하며, 빌더가 최종화되면 이 항목들은 기본 QLayout 로 플러시됩니다. 행과 스팬을 지원하는 레이아웃(Form, Grid)의 경우, 항목은 flush()를 통해 레이아웃에 단계적으로 배치되고 확정됩니다.
Layouting::Widget, Layouting::Column, Layouting::Row, Layouting::Form 및 Layouting::Grid도 참조하십시오 .
멤버 함수 문서
void Layout::addItem(Layouting::Layout::I item)
item 레이아웃 항목을 하위 항목으로 추가합니다.
void Layout::addItems(std::initializer_list<Layouting::Layout::I> items)
items 레이아웃 항목을 하위 항목으로 추가합니다.
void Layout::addRow(std::initializer_list<Layouting::Layout::I> items)
items 를 포함하는 새 행을 시작합니다. 이 행은 addItem() 또는 addItems() 를 사용하여 다른 항목들로 더 확장할 수 있습니다.
addItem() 및 addItems()도 참조하십시오 .
void Layout::align(Qt::Alignment alignment)
이 레이아웃에 가장 최근에 추가된 항목의 정렬을 ‘ alignment ’로 설정합니다. Grid 및 Form 레이아웃에서만 의미가 있습니다.
void Layout::attachTo(QWidget *widget)
생성된 레이아웃을 지정된 ` QWidget ` widget 에 연결합니다.
이 작업은 LayoutBuilder 인스턴스당 한 번만 수행할 수 있습니다.
QWidget *Layout::emerge() const
레이아웃을 확정하고, 새로운 ` QWidget`로 감싸서 반환합니다.
이는 레이아웃을 명시적인 외부 Widget 빌더 없이 위젯(예: QScrollArea 또는 QStackedWidget 내부)으로 삽입해야 할 때 유용합니다. 호출자는 반환된 위젯에 대한 소유권을 갖게 됩니다.
Layout::attachTo()도 참조하십시오 .
void Layout::flush()
축적된 모든 보류 중인 항목을 기본 레이아웃( QLayout)에 반영합니다.
Grid 레이아웃의 경우, flush()를 호출할 때마다 다음 행으로 넘어갑니다. Form 레이아웃의 경우, flush()를 호출할 때마다 레이블-필드 행 하나(또는 전체 너비 행 하나)가 추가됩니다. box 및 flow 레이아웃의 경우 항목이 직접 추가되며, flush()는 아무런 작업도 수행하지 않습니다.
flush()는 초기화자 목록을 받는 생성자의 끝에서 자동으로 호출되며, attachTo() 및 emerge()에 의해서도 호출됩니다. addItem() 또는 addRow()를 사용하여 레이아웃을 단계별로 구축할 때만 수동으로 호출하십시오.
Layout::attachTo() 및 Layout::emerge()도 참조하십시오 .
void Layout::setNoMargins()
네 가지 콘텐츠 여백을 모두 0으로 설정합니다.
Layout::setNormalMargins() 및 Layouting::noMargin도 참조하십시오 .
void Layout::setNormalMargins()
네 가지 콘텐츠 여백을 모두 9픽셀로 설정합니다.
Layout::setNoMargins() 및 Layouting::normalMargin도 참조하십시오 .
void Layout::span(int cols, int rows)
이 레이아웃에 가장 최근에 추가된 항목에 대해 열 스팬을 cols, 행 스팬을 rows 로 설정합니다. 그리드 레이아웃에서만 의미가 있습니다.
Layouting::Span 및 Layouting::SpanAll도 참조하십시오 .
Copyright © The Qt Company Ltd. and other contributors. 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 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.