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. ScrollView "transientScrollBars = true" not working correctly!

ScrollView "transientScrollBars = true" not working correctly!

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 880 Views 1 Watching
  • 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.
  • K Offline
    K Offline
    kerem
    wrote on last edited by kerem
    #1

    Hi guys,

    I need some help about ScrollView usage.

    • I defined a ListView and put listiew into a ScrollView. I set a custom style of my scrollview. I set "transientScrollBars" to "true" for only appearing when I scroll both scrollbars. But, when loading list items and the height is not fit the screen (means no need to vertical scrollbar) the horizontal scrollbar at first loading. But when I scroll my mouse wheel, it doesn't show horizontal scrollbar.

    • If height is larger than screen height and needed to vertical scroll bar is shown, then all the things work correctly. But for this second case, the horizontal scrollbar doesn't swipe on touch screen at this time.

    The "transientScrollBars" property of scrollview seems that doesnt work correctly when listview included in it.

    My code snippet is like below:

    ScrollView{
        id: reportsScrollView
        width: xlinkReport.width
    
        anchors.bottom: parent.bottom
        anchors.top: header.bottom
    
        style: ScrollViewStyle {
            transientScrollBars: true
    
            handle: Rectangle {
                implicitWidth: 10
                implicitHeight: 10
                color: Global.COLORS.greyDark
                radius: dp(10)
            }
    
            scrollBarBackground: Rectangle {
                implicitWidth: 10
                implicitHeight: 10
                color: Global.COLORS.greyGraph
            }
    
            decrementControl: Rectangle {
                implicitWidth: 0
            }
    
            incrementControl: Rectangle {
                implicitWidth: 0
            }
    
            minimumHandleLength: 10
        }
    
        ListView {
            id: reportsList
            width: xlinkReport.width
            contentWidth: getListWidth()
            model: reportsModel
            delegate: dynamicReportsDelegate
            header: reportsHeader
            headerPositioning: ListView.OverlayHeader
        }
    }
    

    My environment is :

    Win 7 x64 and Qt 5.6

    What is the problem with that?

    Can there a bug about thie property of Scroll view?

    Thanks in advance.

    Kerem

    ? 1 Reply Last reply
    0
    • K kerem

      Hi guys,

      I need some help about ScrollView usage.

      • I defined a ListView and put listiew into a ScrollView. I set a custom style of my scrollview. I set "transientScrollBars" to "true" for only appearing when I scroll both scrollbars. But, when loading list items and the height is not fit the screen (means no need to vertical scrollbar) the horizontal scrollbar at first loading. But when I scroll my mouse wheel, it doesn't show horizontal scrollbar.

      • If height is larger than screen height and needed to vertical scroll bar is shown, then all the things work correctly. But for this second case, the horizontal scrollbar doesn't swipe on touch screen at this time.

      The "transientScrollBars" property of scrollview seems that doesnt work correctly when listview included in it.

      My code snippet is like below:

      ScrollView{
          id: reportsScrollView
          width: xlinkReport.width
      
          anchors.bottom: parent.bottom
          anchors.top: header.bottom
      
          style: ScrollViewStyle {
              transientScrollBars: true
      
              handle: Rectangle {
                  implicitWidth: 10
                  implicitHeight: 10
                  color: Global.COLORS.greyDark
                  radius: dp(10)
              }
      
              scrollBarBackground: Rectangle {
                  implicitWidth: 10
                  implicitHeight: 10
                  color: Global.COLORS.greyGraph
              }
      
              decrementControl: Rectangle {
                  implicitWidth: 0
              }
      
              incrementControl: Rectangle {
                  implicitWidth: 0
              }
      
              minimumHandleLength: 10
          }
      
          ListView {
              id: reportsList
              width: xlinkReport.width
              contentWidth: getListWidth()
              model: reportsModel
              delegate: dynamicReportsDelegate
              header: reportsHeader
              headerPositioning: ListView.OverlayHeader
          }
      }
      

      My environment is :

      Win 7 x64 and Qt 5.6

      What is the problem with that?

      Can there a bug about thie property of Scroll view?

      Thanks in advance.

      Kerem

      ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      @kerem said in ScrollView "transientScrollBars = true" not working correctly!:

      Can there a bug about thie property of Scroll view?

      Check the bug tracker to see if it's a known issue, https://bugreports.qt.io.

      1 Reply Last reply
      0

      • Login

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