Obsolete Members for QQuickWindow

以下成员源于类 QQuickWindow 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(obsolete) QSGTexture * createTextureFromId (uint id , const QSize & size , QQuickWindow::CreateTextureOptions options = CreateTextureOption()) const
(obsolete) bool sendEvent (QQuickItem * item , QEvent * e )

成员函数文档编制

QSGTexture *QQuickWindow:: createTextureFromId ( uint id , const QSize & size , QQuickWindow::CreateTextureOptions options = CreateTextureOption()) const

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

创建新的 QSGTexture object from an existing OpenGL texture id and size .

The caller of the function is responsible for deleting the returned texture.

The returned texture will be using GL_TEXTURE_2D as texture target and assumes that internal format is GL_RGBA 。重实现 QSGTexture to create textures with different parameters.

使用 options to customize the texture attributes. The TextureUsesAtlas option is ignored.

警告: This function will return null if the scenegraph has not yet been initialized or OpenGL is not in use.

注意: This function only has an effect when using the default OpenGL scene graph adaptation.

注意: This function has no effect when running on the RHI graphics abstraction. Use createTextureFromNativeObject () 代替。

另请参阅 sceneGraphInitialized () 和 QSGTexture .

bool QQuickWindow:: sendEvent ( QQuickItem * item , QEvent * e )

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

Propagates an event e QQuickItem item on the window.

使用 QCoreApplication::sendEvent () directly instead.

The return value is currently not used.