diff --git a/src/private/qquickstyleitem.cpp b/src/private/qquickstyleitem.cpp index b8edbd2df8a1d1e73b4c13f07bc7c335999c8e7a..8175e7f49da27d5fb52e08ba81a349571590ddb5 100644 --- a/src/private/qquickstyleitem.cpp +++ b/src/private/qquickstyleitem.cpp @@ -620,6 +620,7 @@ void QQuickStyleItem::initStyleOption() m_styleoption = new QStyleOption(); m_styleoption->styleObject = this; + m_styleoption->direction = qApp->layoutDirection(); m_styleoption->rect = QRect(m_paintMargins, 0, width() - 2* m_paintMargins, height()); if (isEnabled()) { @@ -1482,6 +1483,7 @@ void QQuickStyleItem::updatePolish() m_image.setDevicePixelRatio(devicePixelRatio); m_image.fill(Qt::transparent); QPainter painter(&m_image); + painter.setLayoutDirection(qApp->layoutDirection()); paint(&painter); QQuickItem::update(); } else if (!m_image.isNull()) {