在使用QML的ScrollView时,若像官方一样 使用Label,listView等控件的时候,是可以正常出现滚动条的,但是使用Rectangle的时候,是不会正常出现滚动条的

  ScrollView{
            id: scView
            height: stView.width
            width: stView.width
            clip: true


            IndexPage{
                   id: c
                   height: 900
                  width: rightV.width	
  		}
         }
效果如下QML ScrollView使用Rectangle没有下拉条解决方法

可见右边是没有滚动条的,这时需要给ScrollView一个layout

 ScrollView{
            id: scView
            height: stView.width
            width: stView.width
            clip: true

            ColumnLayout{
                 height: 1000
                 width: scView.width
             IndexPage{
                    id: c
                    height: 900
                    width: rightV.width

            }
         }
       }
这样 滚动条就出现了
QML ScrollView使用Rectangle没有下拉条解决方法


相关文章:

  • 2021-06-02
  • 2022-01-10
  • 2021-09-02
  • 2021-12-28
  • 2021-11-20
  • 2022-03-01
  • 2022-01-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2021-07-10
  • 2021-07-31
  • 2021-06-03
相关资源
相似解决方案