当前位置:   article > 正文

qml学习----------------(progressBar)进度条的学习_qml progress bar 横向为纵向

qml progress bar 横向为纵向

今天学习了进度条的使用。查了下qt的官方文档,进度条主要有以下的属性
hovered : bool
indeterminate : bool
maximumValue : real
minimumValue : real
orientation : int //决定是水平的还是竖直的
style : Component
value : real

可以通过style来加载一个progressBarStyle来确定进度条的风格
background : Component //背景颜色
control : ProgressBar //进度条
currentProgress : real //当前进度
panel : Component //这个用来加载 背景颜色 , 进度条等自定义组件的风格等
progress : Component

下面就看下代码来学习下:

import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2

Rectangle{

    width: 520;
    height: 280;
    color:"#a0b0c0";


    Row{

        anchors.fill:  parent;
        anchors.margins: 50;
        spacing: 8;



        //进度条1
        ProgressBar{

            minimumValue: 0;
            maximumValue: 100;
            value: 40;
            width: 150;
            height: 20;

            Timer{
                interval: 1000;
                
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/42492
推荐阅读
相关标签
  

闽ICP备14008679号