|
void | resizeItem (QQuickItem *item) |
|
void | resizeItems () |
|
void | itemImplicitWidthChanged (QQuickItem *item) override |
|
void | itemImplicitHeightChanged (QQuickItem *item) override |
|
qreal | getContentWidth () const override |
|
qreal | getContentHeight () const override |
|
void | init () |
|
void | cleanup () |
|
QQuickItem * | itemAt (int index) const |
|
void | insertItem (int index, QQuickItem *item) |
|
void | moveItem (int from, int to, QQuickItem *item) |
|
void | removeItem (int index, QQuickItem *item) |
|
void | reorderItems () |
|
void | _q_currentIndexChanged () |
|
void | itemChildAdded (QQuickItem *item, QQuickItem *child) override |
|
void | itemSiblingOrderChanged (QQuickItem *item) override |
|
void | itemParentChanged (QQuickItem *item, QQuickItem *parent) override |
|
void | itemDestroyed (QQuickItem *item) override |
|
void | updateContentWidth () |
|
void | updateContentHeight () |
|
| QQuickControlPrivate () |
|
| ~QQuickControlPrivate () |
|
void | init () |
|
virtual bool | handlePress (const QPointF &point, ulong timestamp) |
|
virtual bool | handleMove (const QPointF &point, ulong timestamp) |
|
virtual bool | handleRelease (const QPointF &point, ulong timestamp) |
|
virtual void | handleUngrab () |
|
void | mirrorChange () override |
|
QMarginsF | getPadding () const |
|
qreal | getTopPadding () const |
|
qreal | getLeftPadding () const |
|
qreal | getRightPadding () const |
|
qreal | getBottomPadding () const |
|
qreal | getHorizontalPadding () const |
|
qreal | getVerticalPadding () const |
|
void | setTopPadding (qreal value, bool reset=false) |
|
void | setLeftPadding (qreal value, bool reset=false) |
|
void | setRightPadding (qreal value, bool reset=false) |
|
void | setBottomPadding (qreal value, bool reset=false) |
|
void | setHorizontalPadding (qreal value, bool reset=false) |
|
void | setVerticalPadding (qreal value, bool reset=false) |
|
QMarginsF | getInset () const |
|
qreal | getTopInset () const |
|
qreal | getLeftInset () const |
|
qreal | getRightInset () const |
|
qreal | getBottomInset () const |
|
void | setTopInset (qreal value, bool reset=false) |
|
void | setLeftInset (qreal value, bool reset=false) |
|
void | setRightInset (qreal value, bool reset=false) |
|
void | setBottomInset (qreal value, bool reset=false) |
|
virtual void | resizeBackground () |
|
virtual void | resizeContent () |
|
virtual QQuickItem * | getContentItem () |
|
void | setContentItem_helper (QQuickItem *item, bool notify=true) |
|
virtual void | resolveFont () |
|
void | inheritFont (const QFont &font) |
|
void | updateFont (const QFont &font) |
|
void | setFont_helper (const QFont &font) |
|
void | updateLocale (const QLocale &l, bool e) |
|
virtual void | cancelContentItem () |
|
virtual void | executeContentItem (bool complete=false) |
|
virtual void | cancelBackground () |
|
virtual void | executeBackground (bool complete=false) |
|
void | updateBaselineOffset () |
|
void | addImplicitSizeListener (QQuickItem *item, ChangeTypes changes=ImplicitSizeChanges) |
|
void | removeImplicitSizeListener (QQuickItem *item, ChangeTypes changes=ImplicitSizeChanges) |
|
void | itemImplicitWidthChanged (QQuickItem *item) override |
|
void | itemImplicitHeightChanged (QQuickItem *item) override |
|
void | itemGeometryChanged (QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override |
|
void | itemDestroyed (QQuickItem *item) override |
|
void | itemFocusChanged (QQuickItem *item, Qt::FocusReason reason) override |
|
virtual qreal | getContentWidth () const |
|
virtual qreal | getContentHeight () const |
|
void | updateImplicitContentWidth () |
|
void | updateImplicitContentHeight () |
|
void | updateImplicitContentSize () |
|
QPalette | defaultPalette () const override |
|
| QQuickItemPrivate () |
|
| ~QQuickItemPrivate () override |
|
void | init (QQuickItem *parent) |
|
QQmlListProperty< QObject > | data () |
|
QQmlListProperty< QObject > | resources () |
|
QQmlListProperty< QQuickItem > | children () |
|
QQmlListProperty< QQuickItem > | visibleChildren () |
|
QQmlListProperty< QQuickState > | states () |
|
QQmlListProperty< QQuickTransition > | transitions () |
|
QString | state () const |
|
void | setState (const QString &) |
|
QQuickAnchorLine | left () const |
|
QQuickAnchorLine | right () const |
|
QQuickAnchorLine | horizontalCenter () const |
|
QQuickAnchorLine | top () const |
|
QQuickAnchorLine | bottom () const |
|
QQuickAnchorLine | verticalCenter () const |
|
QQuickAnchorLine | baseline () const |
|
void | localizedTouchEvent (const QTouchEvent *event, bool isFiltering, QMutableTouchEvent *localized) |
|
bool | hasPointerHandlers () const |
|
bool | hasEnabledHoverHandlers () const |
|
virtual void | addPointerHandler (QQuickPointerHandler *h) |
|
virtual void | removePointerHandler (QQuickPointerHandler *h) |
|
void | _q_resourceObjectDeleted (QObject *) |
|
quint64 | _q_createJSWrapper (QV4::ExecutionEngine *engine) |
|
template<typename Fn , typename ... Args> |
void | notifyChangeListeners (QQuickItemPrivate::ChangeTypes changeTypes, Fn &&function, Args &&...args) |
|
virtual void | registerAsContainmentMask (QQuickItem *, bool) |
|
QQuickAnchors * | anchors () const |
| \qmlpropertygroup QtQuick::Item::anchors \qmlproperty AnchorLine QtQuick::Item::anchors.top \qmlproperty AnchorLine QtQuick::Item::anchors.bottom \qmlproperty AnchorLine QtQuick::Item::anchors.left \qmlproperty AnchorLine QtQuick::Item::anchors.right \qmlproperty AnchorLine QtQuick::Item::anchors.horizontalCenter \qmlproperty AnchorLine QtQuick::Item::anchors.verticalCenter \qmlproperty AnchorLine QtQuick::Item::anchors.baseline
|
|
Qt::MouseButtons | acceptedMouseButtons () const |
|
void | addItemChangeListener (QQuickItemChangeListener *listener, ChangeTypes types) |
|
void | updateOrAddItemChangeListener (QQuickItemChangeListener *listener, ChangeTypes types) |
|
void | removeItemChangeListener (QQuickItemChangeListener *, ChangeTypes types) |
|
void | updateOrAddGeometryChangeListener (QQuickItemChangeListener *listener, QQuickGeometryChange types) |
|
void | updateOrRemoveGeometryChangeListener (QQuickItemChangeListener *listener, QQuickGeometryChange types) |
|
QQuickStateGroup * | _states () |
|
QQuickItem::TransformOrigin | origin () const |
|
QString | dirtyToString () const |
|
void | dirty (DirtyType) |
|
void | addToDirtyList () |
|
void | removeFromDirtyList () |
|
void | setCulled (bool) |
|
QSGContext * | sceneGraphContext () const |
|
QSGRenderContext * | sceneGraphRenderContext () const |
|
QList< QQuickItem * > | paintOrderChildItems () const |
|
void | addChild (QQuickItem *) |
|
void | removeChild (QQuickItem *) |
|
void | siblingOrderChanged () |
|
void | markSortedChildrenDirty (QQuickItem *child) |
|
void | refWindow (QQuickWindow *) |
|
void | derefWindow () |
|
void | updateSubFocusItem (QQuickItem *scope, bool focus) |
| Clears all sub focus items from scope.
|
|
QTransform | windowToItemTransform () const |
| Returns a transform that maps points from window space into item space.
|
|
QTransform | itemToWindowTransform () const |
| Returns a transform that maps points from item space into window space.
|
|
void | itemToParentTransform (QTransform *) const |
| Modifies t with this item's local transform relative to its parent.
|
|
QTransform | globalToWindowTransform () const |
| Returns a transform that maps points from global space into window space.
|
|
QTransform | windowToGlobalTransform () const |
| Returns a transform that maps points from window space into global space.
|
|
void | setX (qreal x) |
|
void | xChanged () |
|
| Q_OBJECT_COMPAT_PROPERTY (QQuickItemPrivate, qreal, x, &QQuickItemPrivate::setX, &QQuickItemPrivate::xChanged) |
|
void | setY (qreal y) |
|
void | yChanged () |
|
| Q_OBJECT_COMPAT_PROPERTY (QQuickItemPrivate, qreal, y, &QQuickItemPrivate::setY, &QQuickItemPrivate::yChanged) |
|
void | setWidth (qreal width) |
|
void | widthChanged () |
|
| Q_OBJECT_COMPAT_PROPERTY (QQuickItemPrivate, qreal, width, &QQuickItemPrivate::setWidth, &QQuickItemPrivate::widthChanged) |
|
void | setHeight (qreal height) |
|
void | heightChanged () |
|
| Q_OBJECT_COMPAT_PROPERTY (QQuickItemPrivate, qreal, height, &QQuickItemPrivate::setHeight, &QQuickItemPrivate::heightChanged) |
|
bool | widthValid () const |
|
bool | heightValid () const |
|
qreal | z () const |
|
qreal | scale () const |
|
qreal | rotation () const |
|
qreal | opacity () const |
|
void | setAccessible () |
|
virtual qreal | getImplicitWidth () const |
|
virtual qreal | getImplicitHeight () const |
|
virtual void | implicitWidthChanged () |
|
virtual void | implicitHeightChanged () |
|
void | setImplicitAntialiasing (bool antialiasing) |
|
void | resolveLayoutMirror () |
|
void | setImplicitLayoutMirror (bool mirror, bool inherit) |
|
void | setLayoutMirror (bool mirror) |
|
bool | isMirrored () const |
|
void | emitChildrenRectChanged (const QRectF &rect) |
|
QPointF | computeTransformOrigin () const |
|
virtual bool | transformChanged (QQuickItem *transformedItem) |
|
QPointF | adjustedPosForTransform (const QPointF ¢roid, const QPointF &startPos, const QVector2D &activeTranslatation, qreal startScale, qreal activeScale, qreal startRotation, qreal activeRotation) |
|
QQuickDeliveryAgent * | deliveryAgent () |
|
QQuickDeliveryAgentPrivate * | deliveryAgentPrivate () |
|
QQuickDeliveryAgent * | ensureSubsceneDeliveryAgent () |
|
void | deliverKeyEvent (QKeyEvent *) |
|
bool | filterKeyEvent (QKeyEvent *, bool post) |
|
void | deliverShortcutOverrideEvent (QKeyEvent *) |
|
bool | anyPointerHandlerWants (const QPointerEvent *event, const QEventPoint &point) const |
|
virtual bool | handlePointerEvent (QPointerEvent *, bool avoidGrabbers=false) |
|
virtual void | setVisible (bool visible) |
|
bool | isTransparentForPositioner () const |
|
void | setTransparentForPositioner (bool trans) |
|
bool | calcEffectiveVisible () const |
|
bool | setEffectiveVisibleRecur (bool) |
|
bool | calcEffectiveEnable () const |
|
void | setEffectiveEnableRecur (QQuickItem *scope, bool) |
|
QSGTransformNode * | itemNode () |
|
QSGNode * | childContainerNode () |
|
QSGOpacityNode * | opacityNode () const |
|
QQuickDefaultClipNode * | clipNode () const |
|
QSGRootNode * | rootNode () const |
|
virtual QSGTransformNode * | createTransformNode () |
|
void | refFromEffectItem (bool hide) |
|
void | recursiveRefFromEffectItem (int refs) |
|
void | derefFromEffectItem (bool unhide) |
|
void | itemChange (QQuickItem::ItemChange, const QQuickItem::ItemChangeData &) |
|
virtual void | mirrorChange () |
|
void | setHasCursorInChild (bool hasCursor) |
|
void | setHasHoverInChild (bool hasHover) |
|
virtual void | updatePolish () |
|
virtual void | dumpItemTree (int indent) const |
|
void | ensureExtraData () |
|
| QObjectPrivate (int version=QObjectPrivateVersion) |
|
virtual | ~QObjectPrivate () |
|
void | deleteChildren () |
|
void | clearBindingStorage () |
|
void | checkForIncompatibleLibraryVersion (int version) const |
|
void | setParent_helper (QObject *) |
|
void | moveToThread_helper () |
|
void | setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status) |
|
void | _q_reregisterTimers (void *pointer) |
|
bool | isSender (const QObject *receiver, const char *signal) const |
|
QObjectList | receiverList (const char *signal) const |
|
QObjectList | senderList () const |
|
void | ensureConnectionData () |
|
void | addConnection (int signal, Connection *c) |
|
int | signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const |
|
bool | isSignalConnected (uint signalIdx, bool checkDeclarative=true) const |
|
bool | maybeSignalConnected (uint signalIndex) const |
|
bool | isDeclarativeSignalConnected (uint signalIdx) const |
|
void | connectNotify (const QMetaMethod &signal) |
|
void | disconnectNotify (const QMetaMethod &signal) |
|
void | reinitBindingStorageAfterThreadMove () |
|
virtual std::string | flagsForDumping () const |
|
QtPrivate::QPropertyAdaptorSlotObject * | getPropertyAdaptorSlotObject (const QMetaProperty &property) |
|
| QObjectData ()=default |
|
virtual | ~QObjectData ()=0 |
|
QMetaObject * | dynamicMetaObject () const |
|
virtual | ~QQuickPaletteProviderPrivateBase ()=default |
|
virtual QQuickPalette * | palette () const |
|
virtual void | setPalette (QQuickPalette *p) |
|
virtual void | resetPalette () |
|
virtual bool | providesPalette () const |
|
QPalette | defaultPalette () const override |
|
QPalette | parentPalette (const QPalette &fallbackPalette) const override |
|
void | inheritPalette (const QPalette &parentPalette) |
|
virtual void | updateChildrenPalettes (const QPalette &parentPalette) |
|
virtual | ~QQuickAbstractPaletteProvider ()=default |
|
virtual QPalette | defaultPalette () const =0 |
|
virtual QPalette | parentPalette (const QPalette &fallbackPalette) const |
|
virtual | ~QQuickItemChangeListener () |
|
virtual void | itemGeometryChanged (QQuickItem *, QQuickGeometryChange, const QRectF &) |
|
virtual void | itemSiblingOrderChanged (QQuickItem *) |
|
virtual void | itemVisibilityChanged (QQuickItem *) |
|
virtual void | itemEnabledChanged (QQuickItem *) |
|
virtual void | itemOpacityChanged (QQuickItem *) |
|
virtual void | itemDestroyed (QQuickItem *) |
|
virtual void | itemChildAdded (QQuickItem *, QQuickItem *) |
|
virtual void | itemChildRemoved (QQuickItem *, QQuickItem *) |
|
virtual void | itemParentChanged (QQuickItem *, QQuickItem *) |
|
virtual void | itemRotationChanged (QQuickItem *) |
|
virtual void | itemImplicitWidthChanged (QQuickItem *) |
|
virtual void | itemImplicitHeightChanged (QQuickItem *) |
|
virtual void | itemFocusChanged (QQuickItem *, Qt::FocusReason) |
|
virtual QQuickAnchorsPrivate * | anchorPrivate () |
|
|
static QQuickSwipeViewPrivate * | get (QQuickSwipeView *view) |
|
static QQuickContainerPrivate * | get (QQuickContainer *container) |
|
static void | contentData_append (QQmlListProperty< QObject > *prop, QObject *obj) |
|
static qsizetype | contentData_count (QQmlListProperty< QObject > *prop) |
|
static QObject * | contentData_at (QQmlListProperty< QObject > *prop, qsizetype index) |
|
static void | contentData_clear (QQmlListProperty< QObject > *prop) |
|
static void | contentChildren_append (QQmlListProperty< QQuickItem > *prop, QQuickItem *obj) |
|
static qsizetype | contentChildren_count (QQmlListProperty< QQuickItem > *prop) |
|
static QQuickItem * | contentChildren_at (QQmlListProperty< QQuickItem > *prop, qsizetype index) |
|
static void | contentChildren_clear (QQmlListProperty< QQuickItem > *prop) |
|
static QQuickControlPrivate * | get (QQuickControl *control) |
|
static void | updateFontRecur (QQuickItem *item, const QFont &font) |
|
static QFont | parentFont (const QQuickItem *item) |
|
static void | updateLocaleRecur (QQuickItem *item, const QLocale &l) |
|
static QLocale | calcLocale (const QQuickItem *item) |
|
static void | warnIfCustomizationNotSupported (QObject *control, QQuickItem *item, const QString &propertyName) |
|
static void | hideOldItem (QQuickItem *item) |
|
static void | unhideOldItem (QQuickControl *control, QQuickItem *item, UnhideVisibility visibility=UnhideVisibility::Show) |
|
static void | addImplicitSizeListener (QQuickItem *item, QQuickItemChangeListener *listener, ChangeTypes changes=ImplicitSizeChanges) |
|
static void | removeImplicitSizeListener (QQuickItem *item, QQuickItemChangeListener *listener, ChangeTypes changes=ImplicitSizeChanges) |
|
static QQuickItemPrivate * | get (QQuickItem *item) |
|
static const QQuickItemPrivate * | get (const QQuickItem *item) |
|
static void | data_append (QQmlListProperty< QObject > *, QObject *) |
|
static qsizetype | data_count (QQmlListProperty< QObject > *) |
| \qmlproperty list<QtObject> QtQuick::Item::data \qmldefault
|
|
static QObject * | data_at (QQmlListProperty< QObject > *, qsizetype) |
|
static void | data_clear (QQmlListProperty< QObject > *) |
|
static void | data_removeLast (QQmlListProperty< QObject > *) |
|
static QObject * | resources_at (QQmlListProperty< QObject > *, qsizetype) |
|
static void | resources_append (QQmlListProperty< QObject > *, QObject *) |
|
static qsizetype | resources_count (QQmlListProperty< QObject > *) |
|
static void | resources_clear (QQmlListProperty< QObject > *) |
|
static void | resources_removeLast (QQmlListProperty< QObject > *) |
|
static void | children_append (QQmlListProperty< QQuickItem > *, QQuickItem *) |
|
static qsizetype | children_count (QQmlListProperty< QQuickItem > *) |
|
static QQuickItem * | children_at (QQmlListProperty< QQuickItem > *, qsizetype) |
|
static void | children_clear (QQmlListProperty< QQuickItem > *) |
|
static void | children_removeLast (QQmlListProperty< QQuickItem > *) |
|
static void | visibleChildren_append (QQmlListProperty< QQuickItem > *prop, QQuickItem *o) |
|
static qsizetype | visibleChildren_count (QQmlListProperty< QQuickItem > *prop) |
|
static QQuickItem * | visibleChildren_at (QQmlListProperty< QQuickItem > *prop, qsizetype index) |
|
static qsizetype | transform_count (QQmlListProperty< QQuickTransform > *list) |
|
static void | transform_append (QQmlListProperty< QQuickTransform > *list, QQuickTransform *) |
|
static QQuickTransform * | transform_at (QQmlListProperty< QQuickTransform > *list, qsizetype) |
|
static void | transform_clear (QQmlListProperty< QQuickTransform > *list) |
|
static bool | focusNextPrev (QQuickItem *item, bool forward) |
| QQuickItemPrivate::focusNextPrev focuses the next/prev item in the tab-focus-chain.
|
|
static QQuickItem * | nextTabChildItem (const QQuickItem *item, int start) |
|
static QQuickItem * | prevTabChildItem (const QQuickItem *item, int start) |
|
static QQuickItem * | nextPrevItemInTabFocusChain (QQuickItem *item, bool forward) |
|
static bool | canAcceptTabFocus (QQuickItem *item) |
|
static bool | removeConnection (Connection *c) |
|
static QObjectPrivate * | get (QObject *o) |
|
static const QObjectPrivate * | get (const QObject *o) |
|
template<typename Func1 , typename Func2 > |
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) |
|
template<typename Func1 , typename Func2 > |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
|
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
|
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
|
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
|
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
|
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
|
Enables the user to navigate pages by swiping sideways.
\qmltype SwipeView
\inherits Container
! \instantiates QQuickSwipeView \inqmlmodule QtQuick.Controls
- Since
- 5.7
SwipeView provides a swipe-based navigation model.
SwipeView is populated with a set of pages. One page is visible at a time. The user can navigate between the pages by swiping sideways. Notice that SwipeView itself is entirely non-visual. It is recommended to combine it with PageIndicator, to give the user a visual clue that there are multiple pages.
SwipeView {
id: view
currentIndex: 1
anchors.fill: parent
Item {
id: firstPage
}
Item {
id: secondPage
}
Item {
id: thirdPage
}
}
PageIndicator {
id: indicator
count: view.count
currentIndex: view.currentIndex
anchors.bottom: view.bottom
anchors.horizontalCenter: parent.horizontalCenter
}
As shown above, SwipeView is typically populated with a static set of pages that are defined inline as children of the view. It is also possible to \l {Container::addItem()}{add}, \l {Container::insertItem()}{insert}, \l {Container::moveItem()}{move}, and \l {Container::removeItem()}{remove} pages dynamically at run time.
{file} {SwipeView} {TabBar}
It is generally not advisable to add excessive amounts of pages to a SwipeView. However, when the amount of pages grows larger, or individual pages are relatively complex, it may be desirable to free up resources by unloading pages that are outside the immediate reach of the user. The following example presents how to use \l Loader to keep a maximum of three pages simultaneously instantiated.
SwipeView {
Repeater {
Loader {
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem
sourceComponent: Text {
Component.onCompleted: console.log(
"created:",
index)
Component.onDestruction: console.log(
"destroyed:",
index)
}
}
}
}
QSqlQueryModel * model
[16]
- Note
- SwipeView takes over the geometry management of items added to the view. Using anchors on the items is not supported, and any
width
or height
assignment will be overridden by the view. Notice that this only applies to the root of the item. Specifying width and height, or using anchors for its children works as expected.
- See also
- TabBar, PageIndicator, {Customizing SwipeView}, {Navigation Controls}, {Container Controls}, {Focus Management in Qt Quick Controls}
Definition at line 75 of file qquickswipeview.cpp.