このページでは

QPlatformSurfaceEvent Class

QPlatformSurfaceEvent クラスは、ネイティブプラットフォームのサーフェスイベントを通知するために使用されます。詳細...

ヘッダー: #include <QPlatformSurfaceEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
継承元: QEvent

パブリック型

enum SurfaceEventType { SurfaceCreated, SurfaceAboutToBeDestroyed }

パブリック関数

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

保護関数

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

詳細な説明

プラットフォームウィンドウのイベントは、その基になるネイティブサーフェスが作成されたとき、または破棄されようとしているときに、ウィンドウやオフスクリーンサーフェスに同期的に送信されます。

アプリケーションは、これらのイベントに応答することで、基盤となるプラットフォームサーフェスが存在しているかどうかを把握することができます。

メンバ型のドキュメント

enum QPlatformSurfaceEvent::SurfaceEventType

この列挙型は、プラットフォーム表面イベントのタイプを表します。取り得るタイプは以下の通りです:

定数値説明
QPlatformSurfaceEvent::SurfaceCreated0基盤となるネイティブサーフェスが作成されました
QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed1このイベントの直後に、基となるネイティブサーフェスが破棄される

SurfaceAboutToBeDestroyed イベントタイプは、プラットフォームウィンドウが破棄される前に、そのウィンドウへのレンダリングを停止させる手段として役立ちます。

メンバ関数のドキュメント

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

指定されたsurfaceEventType に対して、プラットフォーム表面イベントを生成します。

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

QPlatformSurfaceEvent のインスタンスをMoveコンストラクタで生成します。この関数は削除されています。

QPlatformSurfaceEvent::SurfaceEventType QPlatformSurfaceEvent::surfaceEventType() const

プラットフォームの表面イベントの具体的なタイプを返します。

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

other をこのQPlatformSurfaceEvent インスタンスに割り当てます。この関数は削除されます。

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

other をこの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.