aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquicktextarea.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp
index 500e7bba..6b492ff2 100644
--- a/src/quicktemplates2/qquicktextarea.cpp
+++ b/src/quicktemplates2/qquicktextarea.cpp
@@ -483,7 +483,10 @@ void QQuickTextArea::setBackground(QQuickItem *background)
delete d->background;
d->background = background;
if (background) {
- background->setParentItem(this);
+ if (d->flickable)
+ background->setParentItem(d->flickable);
+ else
+ background->setParentItem(this);
if (qFuzzyIsNull(background->z()))
background->setZ(-1);
if (isComponentComplete())