版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhengtianzuo06/article/details/78404961
QtWinExtras是专门针对Windows系统特性做的一些定制功能开发
比如 任务栏进度条, 缩略图控制按钮等

任务栏进度条:

TaskbarButton {
property real proValue: 0
property alias interval: timer.interval

function isRunning(){
return(timer.running)
}

function onStart(){
taskbar.proValue = 0;
timer.running = true;
}

function onStop(){
timer.running = false;
}

id: taskbar
overlay.iconSource: "qrc:/logo.ico"
overlay.accessibleDescription: qsTr("加载中...")
progress.visible: (progress.value != 0)
progress.value: taskbar.proValue

Timer{
id: timer
running: false
repeat: true
interval: 20
onTriggered:{
taskbar.proValue++;
if (taskbar.proValue > 100){
taskbar.onStop();
return;
}
}
}
}
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
32
33
34
35
36
37
缩略图控制按钮:

ThumbnailToolBar {
ThumbnailToolButton {
iconSource: "qrc:/Chat_MsgRecordG.svg"
tooltip: qsTr("消息")
}
ThumbnailToolButton {
iconSource: "qrc:/Chat_FriendManagerG.svg"
tooltip: qsTr("联系人")
}
ThumbnailToolButton {
iconSource: "qrc:/Mobile_FindG.svg"
tooltip: qsTr("发现")
}
ThumbnailToolButton {
iconSource: "qrc:/Main_P2PChatG.svg"
tooltip: qsTr("我")
onClicked: {
Qt.quit()
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

需要完整代码请访问QtQuickExamples
---------------------
作者:zhengtianzuo
来源:CSDN
原文:https://blog.csdn.net/zhengtianzuo06/article/details/78404961
版权声明:本文为博主原创文章,转载请附上博文链接!

QmlWinExtras的更多相关文章

随机推荐

  1. POJ 3660 Cow Contest(求图的传递性)

    题意: 给定n头牛, 然后有m个比较, 求出有多少头牛能确定自己的排名. 分析: 假设有一头牛a, 有ki头牛强于自己, kj头牛弱于自己, ki + kj == n-1时, 那么这头牛的排名就确定了 ...

  2. manjaro xfce 18.0 踩坑记录

    manjaro xfce 18.0 踩坑记录 1 简介1.1 Manjaro Linux1.2 开发桌面环境2 自动打开 NumLock3 系统快照3.1 安装timeshift3.2 使用times ...

  3. JSP行为

    JSP行为标签使用XML语法结构来控制servlet引擎.它能够动态插入一个文件,重用JavaBean组件,引导用户去另一个页面,为Java插件产生相关的HTML等等.行为标签只有一种语法格式,它严格 ...

  4. java中String数组和List的互相转化

    1.List转String数组 方法一: //先准备一个List List<String> testList=new ArrayList<>(); testList.add(& ...

  5. xtu summer individual 2 E - Double Profiles

    Double Profiles Time Limit: 3000ms Memory Limit: 262144KB This problem will be judged on CodeForces. ...

  6. ZOJ3860-Find the Spy

    Find the Spy Time Limit: 2 Seconds      Memory Limit: 65536 KB Whoooa! There is a spy in Marjar Univ ...

  7. HDU 5667 Sequence

    指数有递推式,可以通过矩阵快速幂来求解.再用下面这公式快速幂取模即可. (C是素数) #include<cstdio> #include<cstring> #include&l ...

  8. java学习(4)——动手动脑

    根据ppt所给的例子,运行的结果如下所示: ppt中出现的第二个动手动脑如下: 代码如下: 其运行结果如下: 作出简单的分析如下:有点类似于if 和else的关系,总是对应try和catch同层中的异 ...

  9. win7 休眠功能的开启与关闭

    1. 打开控制面板得下面目录,编辑计划设置

  10. 【Todo】Java线程面试题 Top 50 (转载)

    原文链接:http://www.importnew.com/12773.html 这里有一个排版好看一点的:http://www.cnblogs.com/dolphin0520/p/3958019.h ...