8#include <QtQuick/private/qquickflickable_p.h>
152 return QList<QQuickItem *>();
205 emit q->effectiveScrollBarWidthChanged();
223 emit q->effectiveScrollBarHeightChanged();
250 QQuickScrollBarAttached *attached = qobject_cast<QQuickScrollBarAttached *>(qmlAttachedPropertiesObject<QQuickScrollBar>(
q,
false));
314 emit q->implicitContentWidthChanged();
329 emit q->implicitContentHeightChanged();
359 QQuickScrollBarAttached *attached = qobject_cast<QQuickScrollBarAttached *>(qmlAttachedPropertiesObject<QQuickScrollBar>(
q,
false));
368 QQuickScrollBarAttached *attached = qobject_cast<QQuickScrollBarAttached *>(qmlAttachedPropertiesObject<QQuickScrollBar>(
q,
false));
379 if (!
p->explicitInteractive)
380 p->setInteractive(interactive);
386 if (!
p->explicitInteractive)
387 p->setInteractive(interactive);
455 QQmlListProperty<QQuickItem>
children =
p->flickable->flickableChildren();
465 QQmlListProperty<QQuickItem>
children =
p->flickable->flickableChildren();
475 QQmlListProperty<QQuickItem>
children =
p->flickable->flickableChildren();
492 d->contentWidth = -1;
493 d->contentHeight = -1;
502 QQuickScrollBarAttached *attached = qobject_cast<QQuickScrollBarAttached *>(qmlAttachedPropertiesObject<QQuickScrollBar>(
this,
false));
522 return d->effectiveScrollBarWidth;
538 return d->effectiveScrollBarHeight;
556 return QQmlListProperty<QObject>(
q,
this,
577 return QQmlListProperty<QQuickItem>(
q,
this,
587 switch (
event->type()) {
589 d->wasTouched =
true;
590 d->setScrollBarsInteractive(
false);
594 d->wasTouched =
false;
600 d->wasTouched =
false;
601 d->setScrollBarsInteractive(
true);
604 return !
d->wasTouched &&
item ==
d->flickable;
609 return item ==
d->flickable;
614 if (
d->wasTouched && (
item ==
d->verticalScrollBar() ||
item ==
d->horizontalScrollBar()))
615 d->setScrollBarsInteractive(
true);
629 d->setScrollBarsInteractive(
true);
630 if (!
d->wheelEnabled) {
642 switch (
event->key()) {
684 if (newItem !=
d->flickable) {
687 d->flickableHasExplicitContentWidth =
true;
688 d->flickableHasExplicitContentHeight =
true;
689 auto newItemAsFlickable = qobject_cast<QQuickFlickable *>(newItem);
690 if (newItem && !newItemAsFlickable)
691 qmlWarning(
this) <<
"ScrollView only supports Flickable types as its contentItem";
700 newItem->setParentItem(
this);
726 if (
d->hasContentWidth || !
d->flickableHasExplicitContentWidth) {
727 d->flickable->setContentWidth(newSize.
width());
728 d->updateScrollBarWidth();
730 if (
d->hasContentHeight || !
d->flickableHasExplicitContentHeight) {
731 d->flickable->setContentHeight(newSize.
height());
732 d->updateScrollBarHeight();
737#if QT_CONFIG(accessibility)
738QAccessible::Role QQuickScrollView::accessibleRole()
const
740 return QAccessible::Pane;
746#include "moc_qquickscrollview_p.cpp"
The QKeyEvent class describes a key event.
T value(qsizetype i) const
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
static bool disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
void installEventFilter(QObject *filterObj)
Installs an event filter filterObj on this object.
virtual bool eventFilter(QObject *watched, QEvent *event)
Filters events if this object has been installed as an event filter for the watched object.
void removeEventFilter(QObject *obj)
Removes an event filter object obj from this object.
QQuickDeferredPointer< QQuickItem > contentItem
virtual void executeContentItem(bool complete=false)
qreal implicitContentWidth
qreal implicitContentHeight
void setWheelEnabled(bool enabled)
void setPixelAligned(bool align)
QQmlListProperty< QObject > flickableData
void setContentWidth(qreal)
void contentWidthChanged()
void contentHeightChanged()
QQmlListProperty< QQuickItem > flickableChildren
void setContentHeight(qreal)
quint32 componentComplete
QQmlListProperty< QQuickItem > children()
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
void setFiltersChildMouseEvents(bool filter)
Sets whether pointer events intended for this item's children should be filtered through this item.
QList< QQuickItem * > childItems() const
Returns the children of this item.
virtual void keyPressEvent(QKeyEvent *event)
This event handler can be reimplemented in a subclass to receive key press events for an item.
void stackAfter(const QQuickItem *)
Moves the specified sibling item to the index after this item within the list of children.
void contentChildrenChange()
void itemImplicitWidthChanged(QQuickItem *item) override
qreal getContentWidth() const override
qreal getContentHeight() const override
void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
virtual void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize)
constexpr qreal width() const noexcept
Returns the width.
constexpr qreal height() const noexcept
Returns the height.
Combined button and popup list for selecting options.
@ MouseEventNotSynthesized
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei GLsizei GLchar * source
GLdouble GLdouble GLdouble GLdouble q
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
static const struct TessellationWindingOrderTab cw[]