diff options
| -rw-r--r-- | examples/quick/controls/tableview/main.qml | 2 | ||||
| -rw-r--r-- | src/controls/Private/TabBar.qml | 5 | ||||
| -rw-r--r-- | src/controls/Private/qquickstyleitem.cpp | 6 |
3 files changed, 10 insertions, 3 deletions
diff --git a/examples/quick/controls/tableview/main.qml b/examples/quick/controls/tableview/main.qml index e613e42ec..d15b6f65b 100644 --- a/examples/quick/controls/tableview/main.qml +++ b/examples/quick/controls/tableview/main.qml @@ -385,7 +385,7 @@ Window { CheckBox{ id: sortableCheckbox checked: false - text: "Sortindicator" + text: "Sort indicator" anchors.verticalCenter: parent.verticalCenter } CheckBox{ diff --git a/src/controls/Private/TabBar.qml b/src/controls/Private/TabBar.qml index 592ec3480..2e374f994 100644 --- a/src/controls/Private/TabBar.qml +++ b/src/controls/Private/TabBar.qml @@ -119,7 +119,10 @@ FocusScope { interactive: false focus: true - width: Math.min(availableWidth, count ? contentWidth : availableWidth) + // Note this will silence the binding loop warnings caused by QTBUG-35038 + // and should be removed when this issue is resolved. + property int contentWidthWorkaround: contentWidth > 0 ? contentWidth: 0 + width: Math.min(availableWidth, count ? contentWidthWorkaround : availableWidth) height: currentItem ? currentItem.height : 0 highlightMoveDuration: 0 diff --git a/src/controls/Private/qquickstyleitem.cpp b/src/controls/Private/qquickstyleitem.cpp index 566a46f85..0210e76e7 100644 --- a/src/controls/Private/qquickstyleitem.cpp +++ b/src/controls/Private/qquickstyleitem.cpp @@ -211,6 +211,7 @@ QQuickStyleItem::QQuickStyleItem(QQuickItem *parent) setFlag(QQuickItem::ItemHasContents, true); setSmooth(false); + connect(this, SIGNAL(visibleChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(widthChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(heightChanged()), this, SLOT(updateItem())); connect(this, SIGNAL(enabledChanged()), this, SLOT(updateItem())); @@ -1616,7 +1617,10 @@ bool QQuickStyleItem::hasThemeIcon(const QString &icon) const bool QQuickStyleItem::event(QEvent *ev) { if (ev->type() == QEvent::StyleAnimationUpdate) { - polish(); + if (isVisible()) { + ev->accept(); + polish(); + } return true; } else if (ev->type() == QEvent::StyleChange) { if (m_itemType == ScrollBar) |
