- Qt 5.15
- Qt Quick
- C++ Classes
- QQuickWindow
- Qt 5.15.19 Reference Documentation

# Obsolete Members for QQuickWindow

The following members of class QQuickWindow are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

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

## Member Function Documentation

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

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Creates a new 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`. Reimplement QSGTexture to create textures with different parameters.

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

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

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

Note: This function has no effect when running on the RHI graphics abstraction. Use createTextureFromNativeObject() instead.

See also sceneGraphInitialized() and QSGTexture.

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

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Propagates an event e to a QQuickItem item on the window.

Use QCoreApplication::sendEvent() directly instead.

The return value is currently not used.