이 페이지에서

QDesignerFormWindowCursorInterface Class

QDesignerFormWindowCursorInterface 클래스를 사용하면 폼 창의 위젯 선택 상태를 조회하고 수정할 수 있을 뿐만 아니라, 폼에 포함된 모든 위젯의 속성도 수정할 수 있습니다. 더 보기...

헤더: #include <QDesignerFormWindowCursorInterface>
CMake: find_package(Qt6 REQUIRED COMPONENTS Designer)
target_link_libraries(mytarget PRIVATE Qt6::Designer)
qmake: QT += designer

공개 타입

enum MoveMode { MoveAnchor, KeepAnchor }
enum MoveOperation { NoMove, Start, End, Next, Prev, …, Down }

공개 함수

QDesignerFormWindowCursorInterface()
QDesignerFormWindowCursorInterface(const QDesignerFormWindowCursorInterface &)
QDesignerFormWindowCursorInterface(QDesignerFormWindowCursorInterface &&)
virtual ~QDesignerFormWindowCursorInterface()
virtual QWidget *current() const = 0
virtual QDesignerFormWindowInterface *formWindow() const = 0
virtual bool hasSelection() const = 0
bool isWidgetSelected(QWidget *widget) const
virtual bool movePosition(QDesignerFormWindowCursorInterface::MoveOperation operation, QDesignerFormWindowCursorInterface::MoveMode mode = MoveAnchor) = 0
virtual int position() const = 0
virtual void resetWidgetProperty(QWidget *widget, const QString &name) = 0
virtual QWidget *selectedWidget(int index) const = 0
virtual int selectedWidgetCount() const = 0
virtual void setPosition(int position, QDesignerFormWindowCursorInterface::MoveMode mode = MoveAnchor) = 0
virtual void setProperty(const QString &name, const QVariant &value) = 0
virtual void setWidgetProperty(QWidget *widget, const QString &name, const QVariant &value) = 0
virtual QWidget *widget(int index) const = 0
virtual int widgetCount() const = 0
QDesignerFormWindowCursorInterface &operator=(QDesignerFormWindowCursorInterface &&)
QDesignerFormWindowCursorInterface &operator=(const QDesignerFormWindowCursorInterface &)

상세 설명

QDesignerFormWindowCursorInterface는 연관된 폼 창의 텍스트 커서에 대한 인터페이스를 제공하는 편의 클래스입니다. 이 클래스는 주어진 폼 창의 선택 영역을 조회하고, 정의된 모드(MoveMode) 및 이동(MoveOperation)에 따라 선택 영역의 포커스를 변경할 수 있는 일련의 함수를 제공합니다. 또한 이 인터페이스를 사용하여 폼의 위젯을 조회하고 해당 속성을 변경할 수도 있습니다.

이 인터페이스는 직접 인스턴스화되도록 설계된 것이 아니라, Qt Widgets Designer 의 현재 폼 창에 대한 선택 영역 및 위젯에 대한 액세스를 제공하기 위한 것입니다. QDesignerFormWindowInterface 는 항상 연관된 커서 인터페이스를 제공합니다. 특정 위젯에 대한 폼 창은 정적 함수 QDesignerFormWindowInterface::findFormWindow()를 사용하여 가져올 수 있습니다. 예를 들어:

    auto *formWindow = QDesignerFormWindowInterface::findFormWindow(myWidget);

    formWindow->cursor()->setProperty(myWidget, myProperty, newValue);

Qt Widgets Designer 의 form window manager 을 통해 Qt Widgets Designer 의 현재 폼 창 중 어느 것이든 가져올 수 있습니다.

폼 창의 커서 인터페이스를 확보한 후에는 hasSelection() 함수를 사용하여 해당 폼 창에 선택 항목이 있는지 여부를 확인할 수 있습니다. 폼 창의 총 개수는 widgetCount() 및 selectedWidgetCount()를 통해 조회할 수 있습니다. 현재 선택된 위젯(하나 또는 여러 개)은 current() 또는 selectedWidget() 함수를 사용하여 가져올 수 있습니다.

widget() 함수를 사용하여 폼 창의 위젯을 가져올 수 있으며, isWidgetSelected() 함수를 사용하여 위젯이 선택되었는지 확인할 수 있습니다. setProperty() 함수를 사용하여 선택된 위젯의 속성을 설정할 수 있으며, setWidgetProperty() 또는 resetWidgetProperty() 함수를 사용하여 주어진 위젯의 속성을 수정할 수 있습니다.

마지막으로, setPosition() 및 movePosition() 함수를 사용하여 텍스트 커서의 position()을 변경함으로써 선택 항목을 변경할 수 있습니다.

QDesignerFormWindowInterface 및 QDesignerFormWindowManagerInterface항목도 참조하십시오 .

멤버 유형 설명서

enum QDesignerFormWindowCursorInterface::MoveMode

이 열거형은 텍스트 커서가 이동할 때 사용되는 다양한 모드를 설명합니다.

상수값설명
QDesignerFormWindowCursorInterface::MoveAnchor0앵커가 커서와 함께 새로운 위치로 이동합니다.
QDesignerFormWindowCursorInterface::KeepAnchor1앵커는 커서의 이전 위치에 그대로 남아 있습니다.

enum QDesignerFormWindowCursorInterface::MoveOperation

이 열거형은 양식 창에서 발생할 수 있는 텍스트 커서 작업의 유형을 설명합니다.

상수값설명
QDesignerFormWindowCursorInterface::NoMove0커서가 이동하지 않습니다.
QDesignerFormWindowCursorInterface::Start1커서를 포커스 체인의 시작 부분으로 이동합니다.
QDesignerFormWindowCursorInterface::End2커서를 포커스 체인의 끝으로 이동합니다.
QDesignerFormWindowCursorInterface::Next3커서를 포커스 체인의 다음 위젯으로 이동합니다.
QDesignerFormWindowCursorInterface::Prev4커서를 포커스 체인의 이전 위젯으로 이동합니다.
QDesignerFormWindowCursorInterface::Left5커서가 왼쪽으로 이동합니다.
QDesignerFormWindowCursorInterface::Right6커서가 오른쪽으로 이동합니다.
QDesignerFormWindowCursorInterface::Up7커서가 위쪽으로 이동합니다.
QDesignerFormWindowCursorInterface::Down8커서가 아래쪽으로 이동합니다.

멤버 함수 문서

[constexpr noexcept default] QDesignerFormWindowCursorInterface::QDesignerFormWindowCursorInterface()

QDesignerFormWindowCursorInterface 의 인스턴스를 기본 생성합니다.

[delete] QDesignerFormWindowCursorInterface::QDesignerFormWindowCursorInterface(const QDesignerFormWindowCursorInterface &)

QDesignerFormWindowCursorInterface 의 인스턴스를 복사 생성합니다. 이 함수는 삭제되었습니다.

[delete] QDesignerFormWindowCursorInterface::QDesignerFormWindowCursorInterface(QDesignerFormWindowCursorInterface &&)

QDesignerFormWindowCursorInterface 의 인스턴스를 move-construct로 생성합니다. 이 함수는 삭제되었습니다.

[virtual constexpr noexcept default] QDesignerFormWindowCursorInterface::~QDesignerFormWindowCursorInterface()

커서 인터페이스를 제거합니다.

[pure virtual] QWidget *QDesignerFormWindowCursorInterface::current() const

폼 창에서 현재 선택된 위젯을 반환합니다.

selectedWidget()도 참조하십시오 .

[pure virtual] QDesignerFormWindowInterface *QDesignerFormWindowCursorInterface::formWindow() const

이 커서 인터페이스와 연결된 양식 창 인터페이스를 반환합니다.

[pure virtual] bool QDesignerFormWindowCursorInterface::hasSelection() const

폼 창에 선택된 항목이 있으면 true를 반환하고, 그렇지 않으면 false를 반환합니다.

bool QDesignerFormWindowCursorInterface::isWidgetSelected(QWidget *widget) const

지정된 widget 가 선택된 경우 true를 반환하고, 그렇지 않은 경우 false를 반환합니다.

[pure virtual] bool QDesignerFormWindowCursorInterface::movePosition(QDesignerFormWindowCursorInterface::MoveOperation operation, QDesignerFormWindowCursorInterface::MoveMode mode = MoveAnchor)

지정된 mode 를 사용하여 커서에 주어진 operation 를 실행하고, 성공적으로 완료된 경우 true를 반환하며, 그렇지 않은 경우 false를 반환합니다.

position() 및 setPosition()도 참조하십시오 .

[pure virtual] int QDesignerFormWindowCursorInterface::position() const

커서 위치를 반환합니다.

setPosition() 및 movePosition()도 참조하십시오 .

[pure virtual] void QDesignerFormWindowCursorInterface::resetWidgetProperty(QWidget *widget, const QString &name)

지정된 widget 에 대한 속성을, 주어진 name 값으로 초기화하여 기본값으로 되돌립니다.

setProperty() 및 setWidgetProperty()도 참조하십시오 .

[pure virtual] QWidget *QDesignerFormWindowCursorInterface::selectedWidget(int index) const

선택된 위젯 목록에서 지정된 index 를 가진 위젯을 반환합니다.

current() 및 widget()도 참조하십시오 .

[pure virtual] int QDesignerFormWindowCursorInterface::selectedWidgetCount() const

폼 창에서 선택된 위젯의 개수를 반환합니다.

widgetCount()도 참조하십시오 .

[pure virtual] void QDesignerFormWindowCursorInterface::setPosition(int position, QDesignerFormWindowCursorInterface::MoveMode mode = MoveAnchor)

mode 를 사용하여 커서를 지정된 position 로 이동시키는 방법을 지정하고, 커서의 위치를 해당 위치로 설정합니다.

position() 및 movePosition()도 참조하십시오 .

[pure virtual] void QDesignerFormWindowCursorInterface::setProperty(const QString &name, const QVariant &value)

현재 선택된 위젯에 대해, 주어진 ` name ` 속성을 지정된 ` value`로 설정합니다.

setWidgetProperty() 및 resetWidgetProperty()도 참조하십시오 .

[pure virtual] void QDesignerFormWindowCursorInterface::setWidgetProperty(QWidget *widget, const QString &name, const QVariant &value)

지정된 widget 에 대한, 주어진 name 속성을 지정된 value 로 설정합니다.

resetWidgetProperty() 및 setProperty()도 참조하십시오 .

[pure virtual] QWidget *QDesignerFormWindowCursorInterface::widget(int index) const

폼 창의 위젯 목록에서 지정된 index 를 가진 위젯을 반환합니다.

selectedWidget()도 참조하십시오 .

[pure virtual] int QDesignerFormWindowCursorInterface::widgetCount() const

폼 창에 있는 위젯의 개수를 반환합니다.

selectedWidgetCount()도 참조하십시오 .

[delete] QDesignerFormWindowCursorInterface &QDesignerFormWindowCursorInterface::operator=(QDesignerFormWindowCursorInterface &&)

other 를 이 QDesignerFormWindowCursorInterface 인스턴스에 이동 할당합니다. 이 함수는 삭제됩니다.

[delete] QDesignerFormWindowCursorInterface &QDesignerFormWindowCursorInterface::operator=(const QDesignerFormWindowCursorInterface &)

other 를 이 QDesignerFormWindowCursorInterface 인스턴스에 복사-할당합니다. 이 함수는 삭제되었습니다.

© 2026 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 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.