From ee7151d5ab29ba812a93c1231ddc59c9129a7af0 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 2 Nov 2016 14:56:49 +0100 Subject: StackView: provide accessible role QAccessible::LayeredPane: An object that can contain layered children, e.g. in a stack. The same accessible role is used by QStackedWidget. Change-Id: Ia1f96afd5e084958538356e3d9033a3d88cf03c3 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickstackview.cpp | 7 +++++++ src/quicktemplates2/qquickstackview_p.h | 4 ++++ 2 files changed, 11 insertions(+) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp index a29062dd..df9ab74f 100644 --- a/src/quicktemplates2/qquickstackview.cpp +++ b/src/quicktemplates2/qquickstackview.cpp @@ -950,6 +950,13 @@ bool QQuickStackView::childMouseEventFilter(QQuickItem *item, QEvent *event) return window && !window->mouseGrabberItem(); } +#ifndef QT_NO_ACCESSIBILITY +QAccessible::Role QQuickStackView::accessibleRole() const +{ + return QAccessible::LayeredPane; +} +#endif + void QQuickStackAttachedPrivate::itemParentChanged(QQuickItem *item, QQuickItem *parent) { Q_Q(QQuickStackAttached); diff --git a/src/quicktemplates2/qquickstackview_p.h b/src/quicktemplates2/qquickstackview_p.h index 5c119627..f994f361 100644 --- a/src/quicktemplates2/qquickstackview_p.h +++ b/src/quicktemplates2/qquickstackview_p.h @@ -149,6 +149,10 @@ protected: void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; bool childMouseEventFilter(QQuickItem *, QEvent *) override; +#ifndef QT_NO_ACCESSIBILITY + QAccessible::Role accessibleRole() const override; +#endif + private: Q_DISABLE_COPY(QQuickStackView) Q_DECLARE_PRIVATE(QQuickStackView) -- cgit v1.2.3 From b02a9febe602662d30f5e9b4169b461bbf2cbc0c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 2 Nov 2016 15:01:21 +0100 Subject: SwipeView: fix accessibility support Don't specify the role in QML, because using the Accessible attached property creates a hard dependency to the accessibility feature (the QML code won't run when QT_NO_ACCESSIBILITY is defined). Change-Id: Ie540c915547fae94705873292368652e3608c9e7 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickswipeview.cpp | 7 +++++++ src/quicktemplates2/qquickswipeview_p.h | 4 ++++ 2 files changed, 11 insertions(+) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickswipeview.cpp b/src/quicktemplates2/qquickswipeview.cpp index 37115c0a..82d05fbe 100644 --- a/src/quicktemplates2/qquickswipeview.cpp +++ b/src/quicktemplates2/qquickswipeview.cpp @@ -146,6 +146,13 @@ void QQuickSwipeView::itemAdded(int, QQuickItem *item) item->setSize(QSizeF(d->contentItem->width(), d->contentItem->height())); } +#ifndef QT_NO_ACCESSIBILITY +QAccessible::Role QQuickSwipeView::accessibleRole() const +{ + return QAccessible::PageTabList; +} +#endif + /*! \qmlattachedproperty int QtQuick.Controls::SwipeView::index \readonly diff --git a/src/quicktemplates2/qquickswipeview_p.h b/src/quicktemplates2/qquickswipeview_p.h index 49d3b840..c6cb62ba 100644 --- a/src/quicktemplates2/qquickswipeview_p.h +++ b/src/quicktemplates2/qquickswipeview_p.h @@ -68,6 +68,10 @@ protected: void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; void itemAdded(int index, QQuickItem *item) override; +#ifndef QT_NO_ACCESSIBILITY + QAccessible::Role accessibleRole() const override; +#endif + private: Q_DISABLE_COPY(QQuickSwipeView) Q_DECLARE_PRIVATE(QQuickSwipeView) -- cgit v1.2.3 From be9adeeda631926716038b852bf7e4b33daa2dc2 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 2 Nov 2016 15:13:30 +0100 Subject: Popups: use "Dialog" accessible role LayeredPane is described as "an object that can contain layered children, e.g. in a stack". There is no plain "Popup" accessible role. The closest match is "Dialog". Change-Id: I3fca381a953231ff3339ce05e5a00c82f47ba6e7 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickpopup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp index 21303ffe..2982fbd3 100644 --- a/src/quicktemplates2/qquickpopup.cpp +++ b/src/quicktemplates2/qquickpopup.cpp @@ -2356,7 +2356,7 @@ QFont QQuickPopup::defaultFont() const #ifndef QT_NO_ACCESSIBILITY QAccessible::Role QQuickPopup::accessibleRole() const { - return QAccessible::LayeredPane; + return QAccessible::Dialog; } void QQuickPopup::accessibilityActiveChanged(bool active) -- cgit v1.2.3 From b552676670b4df7eb0bb2ffd226b4e316c3d2987 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 3 Nov 2016 09:40:47 +0100 Subject: QQuickComboBox: handle Home and End keys [ChangeLog][Controls][ComboBox] Added handling for Home and End keys. Change-Id: I79ec0644f169503ab38a8e2bee18621a1f671478 Task-number: QTBUG-56884 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickcombobox.cpp | 83 +++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 31 deletions(-) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp index 442c43a4..23ad5bcc 100644 --- a/src/quicktemplates2/qquickcombobox.cpp +++ b/src/quicktemplates2/qquickcombobox.cpp @@ -130,6 +130,11 @@ QT_BEGIN_NAMESPACE \sa highlightedIndex */ +namespace { + enum Activation { NoActivate, Activate }; + enum Highlighting { NoHighlight, Highlight }; +} + class QQuickComboBoxDelegateModel : public QQmlDelegateModel { public: @@ -181,8 +186,9 @@ public: void updateCurrentText(); void incrementCurrentIndex(); void decrementCurrentIndex(); + void setCurrentIndex(int index, Activation activate); void updateHighlightedIndex(); - void setHighlightedIndex(int index); + void setHighlightedIndex(int index, Highlighting highlight); void createDelegateModel(); @@ -241,8 +247,7 @@ void QQuickComboBoxPrivate::itemClicked() Q_Q(QQuickComboBox); int index = delegateModel->indexOf(q->sender(), nullptr); if (index != -1) { - setHighlightedIndex(index); - emit q->highlighted(index); + setHighlightedIndex(index, Highlight); hidePopup(true); } } @@ -283,44 +288,51 @@ void QQuickComboBoxPrivate::updateCurrentText() } } +void QQuickComboBoxPrivate::setCurrentIndex(int index, Activation activate) +{ + Q_Q(QQuickComboBox); + if (currentIndex == index) + return; + + currentIndex = index; + emit q->currentIndexChanged(); + + if (componentComplete) + updateCurrentText(); + + if (activate) + emit q->activated(index); +} + void QQuickComboBoxPrivate::incrementCurrentIndex() { Q_Q(QQuickComboBox); if (isPopupVisible()) { - if (highlightedIndex < q->count() - 1) { - setHighlightedIndex(highlightedIndex + 1); - emit q->highlighted(highlightedIndex); - } + if (highlightedIndex < q->count() - 1) + setHighlightedIndex(highlightedIndex + 1, Highlight); } else { - if (currentIndex < q->count() - 1) { - q->setCurrentIndex(currentIndex + 1); - emit q->activated(currentIndex); - } + if (currentIndex < q->count() - 1) + setCurrentIndex(currentIndex + 1, Activate); } } void QQuickComboBoxPrivate::decrementCurrentIndex() { - Q_Q(QQuickComboBox); if (isPopupVisible()) { - if (highlightedIndex > 0) { - setHighlightedIndex(highlightedIndex - 1); - emit q->highlighted(highlightedIndex); - } + if (highlightedIndex > 0) + setHighlightedIndex(highlightedIndex - 1, Highlight); } else { - if (currentIndex > 0) { - q->setCurrentIndex(currentIndex - 1); - emit q->activated(currentIndex); - } + if (currentIndex > 0) + setCurrentIndex(currentIndex - 1, Activate); } } void QQuickComboBoxPrivate::updateHighlightedIndex() { - setHighlightedIndex(popup->isVisible() ? currentIndex : -1); + setHighlightedIndex(popup->isVisible() ? currentIndex : -1, NoHighlight); } -void QQuickComboBoxPrivate::setHighlightedIndex(int index) +void QQuickComboBoxPrivate::setHighlightedIndex(int index, Highlighting highlight) { Q_Q(QQuickComboBox); if (highlightedIndex == index) @@ -328,6 +340,9 @@ void QQuickComboBoxPrivate::setHighlightedIndex(int index) highlightedIndex = index; emit q->highlightedIndexChanged(); + + if (highlight) + emit q->highlighted(index); } void QQuickComboBoxPrivate::createDelegateModel() @@ -510,13 +525,7 @@ void QQuickComboBox::setCurrentIndex(int index) { Q_D(QQuickComboBox); d->hasCurrentIndex = true; - if (d->currentIndex == index) - return; - - d->currentIndex = index; - emit currentIndexChanged(); - if (isComponentComplete()) - d->updateCurrentText(); + d->setCurrentIndex(index, NoActivate); } /*! @@ -842,8 +851,6 @@ void QQuickComboBox::keyPressEvent(QKeyEvent *event) { Q_D(QQuickComboBox); QQuickControl::keyPressEvent(event); - if (!d->popup) - return; switch (event->key()) { case Qt::Key_Escape: @@ -870,6 +877,20 @@ void QQuickComboBox::keyPressEvent(QKeyEvent *event) d->incrementCurrentIndex(); event->accept(); break; + case Qt::Key_Home: + if (d->isPopupVisible()) + d->setHighlightedIndex(0, Highlight); + else + d->setCurrentIndex(0, Activate); + event->accept(); + break; + case Qt::Key_End: + if (d->isPopupVisible()) + d->setHighlightedIndex(count() - 1, Highlight); + else + d->setCurrentIndex(count() - 1, Activate); + event->accept(); + break; default: break; } -- cgit v1.2.3 From 6f95a086b4d396ff62bc2817bcb1545f60973f38 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 3 Nov 2016 10:07:50 +0100 Subject: QQuickComboBox: key search [ChangeLog][Controls][ComboBox] Added missing keyboard search functionality. Change-Id: If132f2ca0bca8cdb09de03f584c07eec6fb384f6 Task-number: QTBUG-56884 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickcombobox.cpp | 107 +++++++++++++++++++++------------ 1 file changed, 68 insertions(+), 39 deletions(-) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp index 23ad5bcc..01f0f699 100644 --- a/src/quicktemplates2/qquickcombobox.cpp +++ b/src/quicktemplates2/qquickcombobox.cpp @@ -190,6 +190,9 @@ public: void updateHighlightedIndex(); void setHighlightedIndex(int index, Highlighting highlight); + void keySearch(const QString &text); + int match(int start, const QString &text, Qt::MatchFlags flags) const; + void createDelegateModel(); bool pressed; @@ -345,6 +348,65 @@ void QQuickComboBoxPrivate::setHighlightedIndex(int index, Highlighting highligh emit q->highlighted(index); } +void QQuickComboBoxPrivate::keySearch(const QString &text) +{ + int index = match(currentIndex + 1, text, Qt::MatchStartsWith | Qt::MatchWrap); + if (index != -1) + setCurrentIndex(index, Activate); +} + +int QQuickComboBoxPrivate::match(int start, const QString &text, Qt::MatchFlags flags) const +{ + Q_Q(const QQuickComboBox); + uint matchType = flags & 0x0F; + bool wrap = flags & Qt::MatchWrap; + Qt::CaseSensitivity cs = flags & Qt::MatchCaseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive; + int from = start; + int to = q->count(); + + // iterates twice if wrapping + for (int i = 0; (wrap && i < 2) || (!wrap && i < 1); ++i) { + for (int idx = from; idx < to; ++idx) { + QString t = q->textAt(idx); + switch (matchType) { + case Qt::MatchExactly: + if (t == text) + return idx; + break; + case Qt::MatchRegExp: + if (QRegExp(text, cs).exactMatch(t)) + return idx; + break; + case Qt::MatchWildcard: + if (QRegExp(text, cs, QRegExp::Wildcard).exactMatch(t)) + return idx; + break; + case Qt::MatchStartsWith: + if (t.startsWith(text, cs)) + return idx; + break; + case Qt::MatchEndsWith: + if (t.endsWith(text, cs)) + return idx; + break; + case Qt::MatchFixedString: + if (t.compare(text, cs) == 0) + return idx; + break; + case Qt::MatchContains: + default: + if (t.contains(text, cs)) + return idx; + break; + } + } + // prepare for the next iteration + from = 0; + to = start; + } + return -1; +} + void QQuickComboBoxPrivate::createDelegateModel() { Q_Q(QQuickComboBox); @@ -770,45 +832,8 @@ QString QQuickComboBox::textAt(int index) const */ int QQuickComboBox::find(const QString &text, Qt::MatchFlags flags) const { - int itemCount = count(); - uint matchType = flags & 0x0F; - Qt::CaseSensitivity cs = flags & Qt::MatchCaseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive; - - for (int idx = 0; idx < itemCount; ++idx) { - QString t = textAt(idx); - switch (matchType) { - case Qt::MatchExactly: - if (t == text) - return idx; - break; - case Qt::MatchRegExp: - if (QRegExp(text, cs).exactMatch(t)) - return idx; - break; - case Qt::MatchWildcard: - if (QRegExp(text, cs, QRegExp::Wildcard).exactMatch(t)) - return idx; - break; - case Qt::MatchStartsWith: - if (t.startsWith(text, cs)) - return idx; - break; - case Qt::MatchEndsWith: - if (t.endsWith(text, cs)) - return idx; - break; - case Qt::MatchFixedString: - if (t.compare(text, cs) == 0) - return idx; - break; - case Qt::MatchContains: - default: - if (t.contains(text, cs)) - return idx; - break; - } - } - return -1; + Q_D(const QQuickComboBox); + return d->match(0, text, flags); } /*! @@ -892,6 +917,10 @@ void QQuickComboBox::keyPressEvent(QKeyEvent *event) event->accept(); break; default: + if (!event->text().isEmpty()) + d->keySearch(event->text()); + else + event->ignore(); break; } } -- cgit v1.2.3 From d5d413a64a818a42f1199ef76605c16b82c0774b Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 13 Oct 2016 13:14:21 +0200 Subject: ScrollBar: Fix documentation review findings Change-Id: I83703bf0188aa52b873f717b3470ceba4a4d670e Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi --- src/quicktemplates2/qquickscrollbar.cpp | 51 +++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickscrollbar.cpp b/src/quicktemplates2/qquickscrollbar.cpp index 5d921fe3..7ac1df34 100644 --- a/src/quicktemplates2/qquickscrollbar.cpp +++ b/src/quicktemplates2/qquickscrollbar.cpp @@ -65,9 +65,12 @@ QT_BEGIN_NAMESPACE } \endcode + \section1 Attaching ScrollBar to a Flickable + When ScrollBar is attached \l {ScrollBar::vertical}{vertically} or - \l {ScrollBar::horizontal}{horizontally} to a Flickable, the following - properties are automatically set and updated as appropriate: + \l {ScrollBar::horizontal}{horizontally} to a Flickable, its geometry and + the following properties are automatically set and updated as appropriate: + \list \li \l orientation \li \l position @@ -113,6 +116,8 @@ QT_BEGIN_NAMESPACE } \endcode + \section1 Binding the Active State of Horizontal and Vertical Scroll Bars + Horizontal and vertical scroll bars do not share the \l active state with each other by default. In order to keep both bars visible whilst scrolling to either direction, establish a two-way binding between the active states @@ -120,6 +125,29 @@ QT_BEGIN_NAMESPACE \snippet qtquickcontrols2-scrollbar-active.qml 1 + \section1 Non-attached Scroll Bars + + It is possible to create an instance of ScrollBar without using the + attached property API. This is useful when the behavior of the attached + scoll bar is not sufficient or a \l Flickable is not in use. In the + following example, horizontal and vertical scroll bars are used to + scroll over the text without using \l Flickable: + + \snippet qtquickcontrols2-scrollbar-non-attached.qml 1 + + \image qtquickcontrols2-scrollbar-non-attached.png + + When using a non-attached ScrollBar, the following must be done manually: + + \list + \li Layout the scroll bar (with the \l {Item::}{x} and \l {Item::}{y} or + \l {Item::anchors}{anchor} properties, for example). + \li Set the \l size and \l position properties to determine the size and position + of the scroll bar in relation to the scrolled item. + \li Set the \l active property to determine when the scroll bar will be + visible. + \endlist + \sa ScrollIndicator, {Customizing ScrollBar}, {Indicator Controls} */ @@ -199,6 +227,9 @@ QQuickScrollBarAttached *QQuickScrollBar::qmlAttachedProperties(QObject *object) This property holds the size of the scroll bar, scaled to \c {0.0 - 1.0}. \sa {Flickable::visibleArea.heightRatio}{Flickable::visibleArea} + + This property is automatically set when the scroll bar is + \l {Attaching ScrollBar to a Flickable}{attached to a flickable}. */ qreal QQuickScrollBar::size() const { @@ -225,6 +256,9 @@ void QQuickScrollBar::setSize(qreal size) This property holds the position of the scroll bar, scaled to \c {0.0 - 1.0}. \sa {Flickable::visibleArea.yPosition}{Flickable::visibleArea} + + This property is automatically set when the scroll bar is + \l {Attaching ScrollBar to a Flickable}{attached to a flickable}. */ qreal QQuickScrollBar::position() const { @@ -273,6 +307,12 @@ void QQuickScrollBar::setStepSize(qreal step) This property holds whether the scroll bar is active, i.e. when it's \l pressed or the attached Flickable is \l {Flickable::moving}{moving}. + + It is possible to keep \l {Binding the Active State of Horizontal and Vertical Scroll Bars} + {both horizontal and vertical bars visible} while scrolling in either direction. + + This property is automatically set when the scroll bar is + \l {Attaching ScrollBar to a Flickable}{attached to a flickable}. */ bool QQuickScrollBar::isActive() const { @@ -321,6 +361,9 @@ void QQuickScrollBar::setPressed(bool pressed) Possible values: \value Qt.Horizontal Horizontal \value Qt.Vertical Vertical (default) + + This property is automatically set when the scroll bar is + \l {Attaching ScrollBar to a Flickable}{attached to a flickable}. */ Qt::Orientation QQuickScrollBar::orientation() const { @@ -560,6 +603,8 @@ QQuickScrollBarAttached::~QQuickScrollBarAttached() ScrollBar.horizontal: ScrollBar { } } \endcode + + \sa {Attaching ScrollBar to a Flickable} */ QQuickScrollBar *QQuickScrollBarAttached::horizontal() const { @@ -618,6 +663,8 @@ void QQuickScrollBarAttached::setHorizontal(QQuickScrollBar *horizontal) ScrollBar.vertical: ScrollBar { } } \endcode + + \sa {Attaching ScrollBar to a Flickable} */ QQuickScrollBar *QQuickScrollBarAttached::vertical() const { -- cgit v1.2.3 From d59476a0bb93c806c5dfb8bf998b50025ed4f852 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 13 Oct 2016 13:44:01 +0200 Subject: ScrollIndicator: fix documentation review findings Change-Id: Ia742b82e9aaacb35cdde5087ccb1deb977af51ed Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi --- src/quicktemplates2/qquickscrollindicator.cpp | 43 +++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) (limited to 'src/quicktemplates2') diff --git a/src/quicktemplates2/qquickscrollindicator.cpp b/src/quicktemplates2/qquickscrollindicator.cpp index 968f671d..7d93215d 100644 --- a/src/quicktemplates2/qquickscrollindicator.cpp +++ b/src/quicktemplates2/qquickscrollindicator.cpp @@ -65,9 +65,12 @@ QT_BEGIN_NAMESPACE } \endcode - When ScrollIndicator is attached \l {ScrollIndicator::vertical}{vertically} or - \l {ScrollIndicator::horizontal}{horizontally} to a Flickable, the following - properties are automatically set and updated as appropriate: + \section1 Attaching ScrollIndicator to a Flickable + + \note When ScrollIndicator is attached \l {ScrollIndicator::vertical}{vertically} + or \l {ScrollIndicator::horizontal}{horizontally} to a Flickable, its geometry and + the following properties are automatically set and updated as appropriate: + \list \li \l orientation \li \l position @@ -98,6 +101,8 @@ QT_BEGIN_NAMESPACE } \endcode + \section1 Binding the Active State of Horizontal and Vertical Scroll Indicators + Horizontal and vertical scroll indicators do not share the \l active state with each other by default. In order to keep both indicators visible whilst scrolling to either direction, establish a two-way binding between the active states as @@ -105,6 +110,19 @@ QT_BEGIN_NAMESPACE \snippet qtquickcontrols2-scrollindicator-active.qml 1 + \section1 Non-attached Scroll Indicators + + It is possible to create an instance of ScrollIndicator without using the + attached property API. This is useful when the behavior of the attached + scoll indicator is not sufficient or a \l Flickable is not in use. In the + following example, horizontal and vertical scroll indicators are used to + indicate how far the user has scrolled over the text (using \l MouseArea + instead of \l Flickable): + + \snippet qtquickcontrols2-scrollindicator-non-attached.qml 1 + + \image qtquickcontrols2-scrollindicator-non-attached.png + \sa ScrollBar, {Customizing ScrollIndicator}, {Indicator Controls} */ @@ -166,6 +184,9 @@ QQuickScrollIndicatorAttached *QQuickScrollIndicator::qmlAttachedProperties(QObj This property holds the size of the indicator, scaled to \c {0.0 - 1.0}. \sa {Flickable::visibleArea.heightRatio}{Flickable::visibleArea} + + This property is automatically set when the scroll indicator is + \l {Attaching ScrollIndicator to a Flickable}{attached to a flickable}. */ qreal QQuickScrollIndicator::size() const { @@ -190,6 +211,9 @@ void QQuickScrollIndicator::setSize(qreal size) This property holds the position of the indicator, scaled to \c {0.0 - 1.0}. + This property is automatically set when the scroll indicator is + \l {Attaching ScrollIndicator to a Flickable}{attached to a flickable}. + \sa {Flickable::visibleArea.yPosition}{Flickable::visibleArea} */ qreal QQuickScrollIndicator::position() const @@ -215,6 +239,12 @@ void QQuickScrollIndicator::setPosition(qreal position) This property holds whether the indicator is active, that is, when the attached Flickable is \l {Flickable::moving}{moving}. + + It is possible to keep \l {Binding the Active State of Horizontal and Vertical Scroll Indicators} + {both horizontal and vertical indicators visible} while scrolling in either direction. + + This property is automatically set when the scroll indicator is + \l {Attaching ScrollIndicator to a Flickable}{attached to a flickable}. */ bool QQuickScrollIndicator::isActive() const { @@ -240,6 +270,9 @@ void QQuickScrollIndicator::setActive(bool active) Possible values: \value Qt.Horizontal Horizontal \value Qt.Vertical Vertical (default) + + This property is automatically set when the scroll indicator is + \l {Attaching ScrollIndicator to a Flickable}{attached to a flickable}. */ Qt::Orientation QQuickScrollIndicator::orientation() const { @@ -363,6 +396,8 @@ QQuickScrollIndicatorAttached::~QQuickScrollIndicatorAttached() ScrollIndicator.horizontal: ScrollIndicator { } } \endcode + + \sa {Attaching ScrollIndicator to a Flickable} */ QQuickScrollIndicator *QQuickScrollIndicatorAttached::horizontal() const { @@ -419,6 +454,8 @@ void QQuickScrollIndicatorAttached::setHorizontal(QQuickScrollIndicator *horizon ScrollIndicator.vertical: ScrollIndicator { } } \endcode + + \sa {Attaching ScrollIndicator to a Flickable} */ QQuickScrollIndicator *QQuickScrollIndicatorAttached::vertical() const { -- cgit v1.2.3