Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Is it possible to make PageIndicator fit parent?
QtWS25 Last Chance

Is it possible to make PageIndicator fit parent?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qtquickcontrolspageindicator
4 Posts 2 Posters 1.2k Views
  • 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.
  • L Offline
    L Offline
    lollypolly
    wrote on 7 Aug 2016, 18:18 last edited by
    #1

    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
    0
    • J Offline
      J Offline
      jpnurmi
      wrote on 7 Aug 2016, 18:52 last edited by
      #2

      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
      }
      
      L 1 Reply Last reply 8 Aug 2016, 14:31
      2
      • L Offline
        L Offline
        lollypolly
        wrote on 8 Aug 2016, 14:01 last edited by
        #3

        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
        0
        • J jpnurmi
          7 Aug 2016, 18:52

          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
          }
          
          L Offline
          L Offline
          lollypolly
          wrote on 8 Aug 2016, 14:31 last edited by
          #4

          @jpnurmi cool, it works, thanks a lot.

          1 Reply Last reply
          0

          1/4

          7 Aug 2016, 18:18

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved