Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

QPlatformSurfaceEvent Class

The QPlatformSurfaceEvent class is used to notify about native platform surface events. More...

Header: #include <QPlatformSurfaceEvent>
qmake: QT += gui
Since: Qt 5.5
Inherits: QEvent

Public Types

enum SurfaceEventType { SurfaceCreated, SurfaceAboutToBeDestroyed }

Public Functions

QPlatformSurfaceEvent(QPlatformSurfaceEvent::SurfaceEventType surfaceEventType)
QPlatformSurfaceEvent::SurfaceEventType surfaceEventType() const
  • 7 public functions inherited from QEvent

Additional Inherited Members

  • 1 property inherited from QEvent
  • 1 public variable inherited from QEvent
  • 1 static public member inherited from QEvent
  • 2 protected variables inherited from QEvent

Detailed Description

The QPlatformSurfaceEvent class is used to notify about native platform surface events.

Platform window events are synchronously sent to windows and offscreen surfaces when their underlying native surfaces are created or are about to be destroyed.

Applications can respond to these events to know when the underlying platform surface exists.

Member Type Documentation

enum QPlatformSurfaceEvent::SurfaceEventType

This enum describes the type of platform surface event. The possible types are:

Constant Value Description
QPlatformSurfaceEvent::SurfaceCreated 0 The underlying native surface has been created
QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed 1 The underlying native surface will be destroyed immediately after this event

The SurfaceAboutToBeDestroyed event type is useful as a means of stopping rendering to a platform window before it is destroyed.

Member Function Documentation

QPlatformSurfaceEvent::QPlatformSurfaceEvent(QPlatformSurfaceEvent::SurfaceEventType surfaceEventType)

Constructs a platform surface event for the given surfaceEventType.

QPlatformSurfaceEvent::SurfaceEventType QPlatformSurfaceEvent::surfaceEventType() const

Returns the specific type of platform surface event.