qml学习----------------(progressBar)进度条的学习

今天学习了进度条的使用。查了下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;
                
  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值