![]() |
Qt 6.x
The Qt SDK
|
Scrollable view. More...
Public Types | |
enum class | ContentItemFlag { DoNotSet , Set } |
![]() | |
enum class | UnhideVisibility { Show , Hide } |
![]() | |
enum | ChangeType { Geometry = 0x01 , SiblingOrder = 0x02 , Visibility = 0x04 , Opacity = 0x08 , Destroyed = 0x10 , Parent = 0x20 , Children = 0x40 , Rotation = 0x80 , ImplicitWidth = 0x100 , ImplicitHeight = 0x200 , Enabled = 0x400 , Focus = 0x800 , AllChanges = 0xFFFFFFFF } |
enum | ExtraDataTag { NoTag = 0x1 , LeftMouseButtonAccepted = 0x2 } |
enum | DirtyType { TransformOrigin = 0x00000001 , Transform = 0x00000002 , BasicTransform = 0x00000004 , Position = 0x00000008 , Size = 0x00000010 , ZValue = 0x00000020 , Content = 0x00000040 , Smooth = 0x00000080 , OpacityValue = 0x00000100 , ChildrenChanged = 0x00000200 , ChildrenStackingChanged = 0x00000400 , ParentChanged = 0x00000800 , Clip = 0x00001000 , Window = 0x00002000 , EffectReference = 0x00008000 , Visible = 0x00010000 , HideReference = 0x00020000 , Antialiasing = 0x00040000 , TransformUpdateMask , ComplexTransformUpdateMask = Transform | Window , ContentUpdateMask = Size | Content | Smooth | Window | Antialiasing , ChildrenUpdateMask = ChildrenChanged | ChildrenStackingChanged | EffectReference | Window } |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
Additional Inherited Members | |
![]() | |
static const ChangeTypes | ImplicitSizeChanges = QQuickItemPrivate::ImplicitWidth | QQuickItemPrivate::ImplicitHeight | QQuickItemPrivate::Destroyed |
Abstract base type providing functionality common to all controls. | |
![]() | |
void | setCurrentColorGroup () |
Scrollable view.
\qmltype ScrollView \inherits Pane
! \instantiates QQuickScrollView \inqmlmodule QtQuick.Controls
ScrollView provides scrolling for user-defined content. It can be used to either replace a \l Flickable, or to decorate an existing one.
The first example demonstrates the simplest usage of ScrollView.
The second example illustrates using an existing \l Flickable, that is, a \l ListView.
Definition at line 93 of file qquickscrollview.cpp.
|
strong |
Enumerator | |
---|---|
DoNotSet | |
Set |
Definition at line 104 of file qquickscrollview.cpp.
|
overridevirtual |
Reimplemented from QQuickPanePrivate.
Definition at line 148 of file qquickscrollview.cpp.
References QQuickItem::childItems(), QQuickFlickable::contentItem, and flickable.
|
overridevirtual |
\qmlproperty list<Item> QtQuick.Controls::ScrollView::contentChildren
This property holds the list of content children.
The list contains all items that have been declared in QML as children of the view.
contentData
, contentChildren
does not include non-visual QML objects.Reimplemented from QQuickPanePrivate.
Definition at line 568 of file qquickscrollview.cpp.
References contentChildren_append(), contentChildren_at(), contentChildren_clear(), and contentChildren_count().
|
static |
Definition at line 430 of file qquickscrollview.cpp.
References QQuickItemPrivate::children(), QQmlListProperty< T >::data, flickable, QQuickFlickable::flickableChildren, item, Q_ASSERT, Set, and setFlickable().
Referenced by contentChildren().
|
static |
Definition at line 453 of file qquickscrollview.cpp.
References QQuickItemPrivate::children(), and QQmlListProperty< T >::data.
Referenced by contentChildren().
|
static |
Definition at line 463 of file qquickscrollview.cpp.
References QQuickItemPrivate::children(), and QQmlListProperty< T >::data.
Referenced by contentChildren().
|
static |
Definition at line 443 of file qquickscrollview.cpp.
References QQuickItemPrivate::children(), and QQmlListProperty< T >::data.
Referenced by contentChildren().
|
overridevirtual |
\qmlproperty list<QtObject> QtQuick.Controls::ScrollView::contentData \qmldefault
This property holds the list of content data.
The list contains all objects that have been declared in QML as children of the view.
contentChildren
, contentData
does include non-visual QML objects.Reimplemented from QQuickPanePrivate.
Definition at line 547 of file qquickscrollview.cpp.
References contentData_append(), contentData_at(), contentData_clear(), and contentData_count().
|
static |
Definition at line 385 of file qquickscrollview.cpp.
References QQmlListProperty< T >::data, flickable, QQuickFlickable::flickableData, Q_ASSERT, and Set.
Referenced by contentData().
|
static |
Definition at line 410 of file qquickscrollview.cpp.
References QQmlListProperty< T >::at, and QQmlListProperty< T >::data.
Referenced by contentData().
|
static |
Definition at line 420 of file qquickscrollview.cpp.
References QQmlListProperty< T >::clear, and QQmlListProperty< T >::data.
Referenced by contentData().
|
static |
Definition at line 400 of file qquickscrollview.cpp.
References QQmlListProperty< T >::count, and QQmlListProperty< T >::data.
Referenced by contentData().
void QQuickScrollViewPrivate::disconnectScrollBarSignals | ( | QQuickScrollBarAttachedPrivate * | scrollBar | ) |
Definition at line 223 of file qquickscrollview.cpp.
References QObjectPrivate::disconnect(), scrollBar, updateScrollBarHeight(), updateScrollBarWidth(), and QQuickItem::visibleChanged().
Referenced by setFlickable().
QQuickFlickable * QQuickScrollViewPrivate::ensureFlickable | ( | ContentItemFlag | contentItemFlag | ) |
Definition at line 165 of file qquickscrollview.cpp.
References flickable, flickableHasExplicitContentHeight, flickableHasExplicitContentWidth, QQuickItem::setClip(), setFlickable(), and QQuickFlickable::setPixelAligned().
Referenced by getContentItem().
void QQuickScrollViewPrivate::flickableContentHeightChanged | ( | ) |
Definition at line 311 of file qquickscrollview.cpp.
References ch, QQuickItemPrivate::componentComplete, QQuickFlickable::contentHeight, emit, flickable, flickableHasExplicitContentHeight, QQuickControlPrivate::implicitContentHeight, and qFuzzyCompare().
Referenced by setFlickable().
void QQuickScrollViewPrivate::flickableContentWidthChanged | ( | ) |
Definition at line 296 of file qquickscrollview.cpp.
References QQuickItemPrivate::componentComplete, QQuickFlickable::contentWidth, cw, emit, flickable, flickableHasExplicitContentWidth, QQuickControlPrivate::implicitContentWidth, and qFuzzyCompare().
Referenced by setFlickable().
|
overridevirtual |
Reimplemented from QQuickPanePrivate.
Definition at line 338 of file qquickscrollview.cpp.
References QQuickFlickable::contentHeight, flickable, flickableHasExplicitContentHeight, and QQuickPanePrivate::getContentHeight().
|
overridevirtual |
Reimplemented from QQuickPanePrivate.
Definition at line 156 of file qquickscrollview.cpp.
References QQuickControlPrivate::contentItem, DoNotSet, ensureFlickable(), and QQuickControlPrivate::executeContentItem().
|
overridevirtual |
Reimplemented from QQuickPanePrivate.
Definition at line 326 of file qquickscrollview.cpp.
References QQuickFlickable::contentWidth, flickable, flickableHasExplicitContentWidth, and QQuickPanePrivate::getContentWidth().
QQuickScrollBar * QQuickScrollViewPrivate::horizontalScrollBar | ( | ) | const |
Definition at line 359 of file qquickscrollview.cpp.
References QQuickScrollBarAttached::horizontal.
Referenced by setScrollBarsInteractive(), and updateScrollBarHeight().
|
overridevirtual |
Reimplemented from QQuickPanePrivate.
Definition at line 473 of file qquickscrollview.cpp.
References QQuickItemPrivate::componentComplete, QQuickPanePrivate::contentWidth, item, and QQuickPanePrivate::itemImplicitWidthChanged().
bool QQuickScrollViewPrivate::setFlickable | ( | QQuickFlickable * | flickable, |
ContentItemFlag | contentItemFlag | ||
) |
Definition at line 238 of file qquickscrollview.cpp.
References QQuickItem::childrenChanged(), QObjectPrivate::connect(), QQuickPanePrivate::contentChildrenChange(), QQuickPanePrivate::contentHeight, QQuickFlickable::contentHeightChanged(), QQuickFlickable::contentItem, QQuickPanePrivate::contentWidth, QQuickFlickable::contentWidthChanged(), QObjectPrivate::disconnect(), disconnectScrollBarSignals(), flickable, flickableContentHeightChanged(), flickableContentWidthChanged(), QQuickScrollBarAttachedPrivate::get(), QQuickPanePrivate::hasContentHeight, QQuickPanePrivate::hasContentWidth, QObject::installEventFilter(), item, QObject::removeEventFilter(), scrollBar, Set, QQuickFlickable::setContentHeight(), QQuickFlickable::setContentWidth(), updateScrollBarHeight(), updateScrollBarWidth(), and QQuickItem::visibleChanged().
Referenced by contentChildren_append(), and ensureFlickable().
void QQuickScrollViewPrivate::setScrollBarsInteractive | ( | bool | interactive | ) |
Definition at line 368 of file qquickscrollview.cpp.
References QQuickScrollBarPrivate::get(), horizontalScrollBar(), and verticalScrollBar().
void QQuickScrollViewPrivate::updateScrollBarHeight | ( | ) |
Definition at line 204 of file qquickscrollview.cpp.
References QQuickScrollBar::AlwaysOff, effectiveScrollBarHeight, emit, horizontalScrollBar(), and isUpdatingScrollBar.
Referenced by disconnectScrollBarSignals(), and setFlickable().
void QQuickScrollViewPrivate::updateScrollBarWidth | ( | ) |
Definition at line 186 of file qquickscrollview.cpp.
References QQuickScrollBar::AlwaysOff, effectiveScrollBarWidth, emit, isUpdatingScrollBar, and verticalScrollBar().
Referenced by disconnectScrollBarSignals(), and setFlickable().
QQuickScrollBar * QQuickScrollViewPrivate::verticalScrollBar | ( | ) | const |
Definition at line 350 of file qquickscrollview.cpp.
References QQuickScrollBarAttached::vertical.
Referenced by setScrollBarsInteractive(), and updateScrollBarWidth().
qreal QQuickScrollViewPrivate::effectiveScrollBarHeight = 0 |
Definition at line 145 of file qquickscrollview.cpp.
Referenced by updateScrollBarHeight().
qreal QQuickScrollViewPrivate::effectiveScrollBarWidth = 0 |
Definition at line 144 of file qquickscrollview.cpp.
Referenced by updateScrollBarWidth().
QQuickFlickable* QQuickScrollViewPrivate::flickable = nullptr |
Definition at line 140 of file qquickscrollview.cpp.
Referenced by contentChildItems(), contentChildren_append(), contentData_append(), ensureFlickable(), flickableContentHeightChanged(), flickableContentWidthChanged(), getContentHeight(), getContentWidth(), and setFlickable().
bool QQuickScrollViewPrivate::flickableHasExplicitContentHeight = true |
Definition at line 142 of file qquickscrollview.cpp.
Referenced by ensureFlickable(), flickableContentHeightChanged(), and getContentHeight().
bool QQuickScrollViewPrivate::flickableHasExplicitContentWidth = true |
Definition at line 141 of file qquickscrollview.cpp.
Referenced by ensureFlickable(), flickableContentWidthChanged(), and getContentWidth().
bool QQuickScrollViewPrivate::isUpdatingScrollBar = false |
Definition at line 143 of file qquickscrollview.cpp.
Referenced by updateScrollBarHeight(), and updateScrollBarWidth().
bool QQuickScrollViewPrivate::wasTouched = false |
Definition at line 139 of file qquickscrollview.cpp.