이 페이지에서

QWaylandQuickItem Class

QWaylandQuickItem 클래스는 Wayland 클라이언트의 표면을 나타내는 ‘ Qt Quick ’ 항목을 제공합니다. 더 보기...

헤더: #include <QWaylandQuickItem>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
QML에서: WaylandQuickItem
상속: QQuickItem
상속받는 클래스:

QWaylandQuickShellSurfaceItem

속성

공개 함수

QWaylandQuickItem(QQuickItem *parent = nullptr)
virtual ~QWaylandQuickItem() override
bool allowDiscardFrontBuffer() const
QWaylandCompositor *compositor() const
bool focusOnClick() const
bool inputEventsEnabled() const
bool inputRegionContains(const QPointF &localPosition) const
bool isBufferLocked() const
bool isPaintEnabled() const
QPointF mapFromSurface(const QPointF &point) const
QPointF mapToSurface(const QPointF &point) const
QWaylandSurface::Origin origin() const
QWaylandOutput *output() const
void setAllowDiscardFrontBuffer(bool discard)
void setBufferLocked(bool locked)
void setFocusOnClick(bool focus)
void setInputEventsEnabled(bool enabled)
void setOutput(QWaylandOutput *output)
void setPrimary()
void setSubsurfaceHandler(QObject *)
void setSurface(QWaylandSurface *surface)
void setTouchEventsEnabled(bool enabled)
QObject *subsurfaceHandler() const
QWaylandSurface *surface() const
bool touchEventsEnabled() const
QWaylandView *view() const

재구현된 공용 함수

virtual QSGTextureProvider *textureProvider() const override

공개 슬롯

void setPaintEnabled(bool paintEnabled)
virtual void takeFocus(QWaylandSeat *device = nullptr)

신호

상세 설명

Qt Quick 에서 QWaylandCompositor 를 작성할 때, 이 클래스를 사용하여 클라이언트의 콘텐츠를 출력 장치에 표시하고 사용자 입력을 클라이언트로 전달할 수 있습니다.

속성 문서

allowDiscardFrontBuffer : bool

기본적으로 이 항목은 새로운 버퍼가 사용 가능해지고 ` updatePaintNode()`가 호출될 때까지 현재 버퍼를 잠급니다. 스로틀링 뷰에서 더 이상 버퍼를 사용하지 않을 때 Qt가 버퍼를 즉시 해제하도록 하려면 이 속성을 `true`로 설정하십시오. 이는 업데이트 간격이 긴 항목에 유용합니다.

액세스 함수:

bool allowDiscardFrontBuffer() const
void setAllowDiscardFrontBuffer(bool discard)

Notifier 시그널:

void allowDiscardFrontBufferChanged()

bufferLocked : bool

이 속성은 항목의 버퍼가 현재 잠겨 있는지 여부를 나타냅니다. 버퍼가 잠겨 있는 동안에는 해제되지 않고 클라이언트로 반환되지 않습니다.

기본값은 false입니다.

액세스 함수:

bool isBufferLocked() const
void setBufferLocked(bool locked)

알림 신호:

void bufferLockedChanged()

[read-only] compositor : QWaylandCompositor*

이 속성은 이 ` QWaylandQuickItem`에 의해 렌더링된 서페이스의 컴포지터를 저장합니다.

액세스 함수:

QWaylandCompositor *compositor() const

Notifier 신호:

void compositorChanged()

focusOnClick : bool

이 속성은 ‘ QWaylandQuickItem ’가 클릭되거나 터치되었을 때 포커스를 받을지 여부를 지정합니다.

기본값은 ` true`입니다.

액세스 함수:

bool focusOnClick() const
void setFocusOnClick(bool focus)

Notifier 신호:

void focusOnClickChanged()

inputEventsEnabled : bool

이 속성은 해당 항목에 대해 입력 이벤트가 활성화되어 있는지 여부를 나타냅니다.

true 인 경우, 해당 항목은 키보드 및 마우스 이벤트와 같은 입력 이벤트를 처리하고 대응합니다. false 인 경우, 입력 이벤트는 무시됩니다.

액세스 함수:

bool inputEventsEnabled() const
void setInputEventsEnabled(bool enabled)

알림 신호:

void inputEventsEnabledChanged()

[read-only] origin : QWaylandSurface::Origin

이 속성은 표면의 현재 버퍼의 원점을 나타내며, 즉 버퍼의 어느 모서리가 좌표 (0, 0)에 해당하는지를 나타냅니다.

액세스 함수:

QWaylandSurface::Origin origin() const

알림 신호:

void originChanged()

QWaylandSurface::origin도 참조하십시오 .

output : QWaylandOutput*

이 속성은 이 항목이 표시되는 출력 대상을 지정합니다.

액세스 함수:

QWaylandOutput *output() const
void setOutput(QWaylandOutput *output)

알림 신호:

void outputChanged()

paintEnabled : bool

이 속성을 ` false `로 설정하면 항목의 렌더링이 중지됩니다. ` visible `를 ` false`로 설정하여 항목을 숨기는 것과는 달리, 이 설정은 마우스나 키보드 입력이 해당 항목에 전달되는 것을 막지는 않습니다.

액세스 함수:

bool isPaintEnabled() const
void setPaintEnabled(bool paintEnabled)

Notifier 시그널:

void paintEnabledChanged()

subsurfaceHandler : QObject*

이 속성은 기본 서브서피스 동작을 재정의할 수 있는 방법을 제공합니다.

기본적으로 Qt는 이 항목의 자식으로 새로운 QWaylandQuickItem 를 생성하고 올바른 위치를 유지합니다.

기본 동작을 재정의하려면 이 속성에 핸들러 객체를 할당하십시오. 핸들러는 handleSubsurfaceAdded(QWaylandSurface*) 메서드를 구현해야 합니다.

이 속성의 기본값은 ` nullptr`입니다.

액세스 함수:

QObject *subsurfaceHandler() const
void setSubsurfaceHandler(QObject *)

Notifier 신호:

void subsurfaceHandlerChanged()

surface : QWaylandSurface*

이 속성은 이 QWaylandQuickItem 에 의해 렌더링된 표면을 포함합니다.

액세스 함수:

QWaylandSurface *surface() const
void setSurface(QWaylandSurface *surface)

Notifier 신호:

void surfaceChanged()

touchEventsEnabled : bool

이 속성은 터치 이벤트가 클라이언트 표면으로 전달되는 경우 ` true `을 반환하고, 그렇지 않은 경우 ` false `을 반환합니다.

액세스 함수:

bool touchEventsEnabled() const
void setTouchEventsEnabled(bool enabled)

알림 신호:

void touchEventsEnabledChanged()

멤버 함수 설명서

QWaylandQuickItem::QWaylandQuickItem(QQuickItem *parent = nullptr)

지정된 ` parent`을 사용하여 `QWaylandQuickItem` 객체를 생성합니다.

[override virtual noexcept] QWaylandQuickItem::~QWaylandQuickItem()

QWaylandQuickItem 를 파괴하라.

bool QWaylandQuickItem::inputRegionContains(const QPointF &localPosition) const

이 항목의 표면 입력 영역에 localPosition 로 지정된 위치가 포함되어 있으면 true 를 반환합니다.

[invokable] QPointF QWaylandQuickItem::mapFromSurface(const QPointF &point) const

Wayland 표면의 좌표계에 있는 주어진 point 를 이 항목의 좌표계 내의 해당 점으로 매핑하고, 매핑된 좌표를 반환합니다.

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

[invokable] QPointF QWaylandQuickItem::mapToSurface(const QPointF &point) const

이 항목의 좌표계에서 주어진 ` point `를 Wayland 표면의 좌표계 내 해당 지점에 매핑하고, 매핑된 좌표를 반환합니다.

참고: 이 함수는 메타 객체 시스템 및 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

[invokable] void QWaylandQuickItem::setPrimary()

QWaylandQuickItem 의 뷰를 해당 서페이스의 기본 뷰로 설정합니다.

참고: 이 함수는 메타 객체 시스템 및 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

QWaylandSurface::primaryView도 참조하십시오 .

[signal] void QWaylandQuickItem::surfaceDestroyed()

이 신호는 클라이언트가 QWaylandQuickItem 과 연결된 wl_surface 를 소멸시켰을 때 발생합니다. 이 신호의 핸들러는 QWaylandQuickItem 를 즉시 소멸시키거나, 닫힘 애니메이션을 시작한 후 Item을 소멸시켜야 합니다.

애니메이션이 시작되면, 애니메이션이 끝날 때까지 아이템이 콘텐츠를 유지하도록 bufferLocked 을 설정해야 합니다.

QWaylandQuickItem::bufferLocked도 참조하십시오 .

[virtual slot] void QWaylandQuickItem::takeFocus(QWaylandSeat *device = nullptr)

이 함수를 호출하면 해당 항목이 입력 필드 device 의 포커스를 가져옵니다.

[override virtual] QSGTextureProvider *QWaylandQuickItem::textureProvider() const

QQuickItem::textureProvider() const를 재구현합니다.

이 QWaylandQuickItem 의 텍스처 제공자를 반환합니다.

QWaylandView *QWaylandQuickItem::view() const

이 ` QWaylandQuickItem`에 의해 렌더링된 뷰를 반환합니다.

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