Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Is it possible to make PageIndicator fit parent?

    QML and Qt Quick
    qtquickcontrols pageindicator
    2
    4
    892
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lollypolly
      lollypolly last edited by

      I am adding too much items in SwipeView and PageIndicator does not fit my windows. Can someone help me to avoid this? For example, make dots smaller, or replace PageIndicator on ScroolIndicator or make it look like ScroolIndicator?

      1 Reply Last reply Reply Quote 0
      • jpnurmi
        jpnurmi last edited by

        We never thought someone would use PageIndicator for so many items that it wouldn't fit on the screen. :) Nevertheless, here's an untested (sorry, no access to a development environment right now) example snippet that shows how you might be able to use a ScrollIndicator:

        ScrollIndicator {
            width: swipeView.width
            anchors.bottom: swipeView.bottom
        
            active: true
            orientation: Qt.Horizontal
        
            readonly property Flickable flickable: swipeView.contentItem
            size: flickable.visibleArea.widthRatio
            position: flickable.visibleArea.xPosition
        }
        
        lollypolly 1 Reply Last reply Reply Quote 2
        • lollypolly
          lollypolly last edited by

          Thanks for reply, will try it out later. I am using it for swipable image preview area. Maybe there is better solution for this, I don't know. But it works well except of indicator.

          1 Reply Last reply Reply Quote 0
          • lollypolly
            lollypolly @jpnurmi last edited by

            @jpnurmi cool, it works, thanks a lot.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post