Nesta página

QPlatformSurfaceEvent Class

A classe QPlatformSurfaceEvent é usada para notificar sobre eventos de superfície da plataforma nativa. Mais...

Cabeçalho: #include <QPlatformSurfaceEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Herdado de: QEvent

Tipos públicos

enum SurfaceEventType { SurfaceCreated, SurfaceAboutToBeDestroyed }

Funções públicas

QPlatformSurfaceEvent(QPlatformSurfaceEvent::SurfaceEventType surfaceEventType)
QPlatformSurfaceEvent::SurfaceEventType surfaceEventType() const

Funções protegidas

QPlatformSurfaceEvent(QPlatformSurfaceEvent &&)
QPlatformSurfaceEvent &operator=(QPlatformSurfaceEvent &&)
QPlatformSurfaceEvent &operator=(const QPlatformSurfaceEvent &other)

Descrição detalhada

Os eventos da janela da plataforma são enviados de forma síncrona para janelas e superfícies fora da tela quando suas superfícies nativas subjacentes são criadas ou estão prestes a ser destruídas.

Os aplicativos podem responder a esses eventos para saber quando a superfície da plataforma subjacente existe.

Documentação do tipo de membro

enum QPlatformSurfaceEvent::SurfaceEventType

Esta enumeração descreve o tipo de evento de superfície da plataforma. Os tipos possíveis são:

ConstanteValorDescrição
QPlatformSurfaceEvent::SurfaceCreated0A superfície nativa subjacente foi criada
QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed1A superfície nativa subjacente será destruída imediatamente após este evento

O tipo de evento ` SurfaceAboutToBeDestroyed ` é útil como forma de interromper a renderização em uma janela da plataforma antes que ela seja destruída.

Documentação da função membro

[explicit] QPlatformSurfaceEvent::QPlatformSurfaceEvent(QPlatformSurfaceEvent::SurfaceEventType surfaceEventType)

Cria um evento de superfície da plataforma para o objeto ` surfaceEventType` fornecido.

[protected delete] QPlatformSurfaceEvent::QPlatformSurfaceEvent(QPlatformSurfaceEvent &&)

Cria uma instância de ` QPlatformSurfaceEvent` por meio da função `move`. Essa função foi excluída.

QPlatformSurfaceEvent::SurfaceEventType QPlatformSurfaceEvent::surfaceEventType() const

Retorna o tipo específico de evento de superfície da plataforma.

[protected delete] QPlatformSurfaceEvent &QPlatformSurfaceEvent::operator=(QPlatformSurfaceEvent &&)

A função “Move-assigns” atribui “ other ” a esta instância “ QPlatformSurfaceEvent ”. Essa função é excluída.

[noexcept protected default] QPlatformSurfaceEvent &QPlatformSurfaceEvent::operator=(const QPlatformSurfaceEvent &other)

Copia e atribui other a esta instância QPlatformSurfaceEvent.

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