diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickitem.cpp | 7 | ||||
-rw-r--r-- | src/quick/items/qquickitem_p.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 7195e8ab00..3e59bee180 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -5497,9 +5497,9 @@ void QQuickItemLayer::activateEffect() Q_ASSERT(!m_effect); QObject *created = m_effectComponent->create(); - m_effect = qobject_cast<QQuickShaderEffect *>(created); + m_effect = qobject_cast<QQuickItem *>(created); if (!m_effect) { - qWarning("Item: layer.effect is not a ShaderEffect."); + qWarning("Item: layer.effect is not a QML Item."); delete created; return; } @@ -5527,7 +5527,8 @@ void QQuickItemLayer::deactivateEffect() Holds the effect that is applied to this layer. - The effect must be a \l ShaderEffect. + The effect is typically a \l ShaderEffect component, although any \l Item component can be + assigned. The effect should have a source texture property with a name matching \l samplerName. \sa samplerName */ diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h index 2383ae11ee..1f634bea21 100644 --- a/src/quick/items/qquickitem_p.h +++ b/src/quick/items/qquickitem_p.h @@ -225,7 +225,7 @@ private: QRectF m_sourceRect; QString m_name; QDeclarativeComponent *m_effectComponent; - QQuickShaderEffect *m_effect; + QQuickItem *m_effect; QQuickShaderEffectSource *m_effectSource; }; |