版权声明:本文为博主原创文章,未经博主允许不得转载。 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. Spring异常——BeanNotOfRequiredTypeException

    使用junit测试ssh搭建的框架的时候,遇到了一个异常: 异常消息: org.springframework.beans.factory.BeanCreationException: Error c ...

  2. 一份快速实用的 tcpdump 命令参考手册

    对于 tcpdump 的使用,大部分管理员会分成两类.有一类管理员,他们熟知  tcpdump 和其中的所有标记:另一类管理员,他们仅了解基本的使用方法,剩下事情都要借助参考手册才能完成.出现这种情况 ...

  3. (转)]PYTHON Tkinter GUI

    import Tkinterroot=Tkinter.Tk()label=Tkinter.Label(root,text='hello ,python')label.pack()      #将LAB ...

  4. POJ 2391 Ombrophobic Bovines【二分 网络流】

    题目大意:F个草场,P条道路(无向),每个草场初始有几头牛,还有庇护所,庇护所有个容量,每条道路走完都有时间,问所有奶牛都到庇护所最大时间最小是多少? 思路:和POJ2112一样的思路,二分以后构建网 ...

  5. UVA12103 贪心+置换

    题意:给出26个大写字母的置换B,问是否存在一个置换A,舍得A^2=B,如果存在输出Yes,否则输出No 题解: 研究一下置换A与A^2关系. 假设A=(a1 a2 a3)(b1 b2 b3 b4) ...

  6. Android: java.lang.ClassCastException: android.widget.imageView cannot be cast to android.widget.textView异常解决

    有时在修改xml文件时,全报这种错误,这个应该是缓存没得到及时更新导致的,可以通过以下方法解决: Eclipse tends to mess up your resources every now a ...

  7. winrar5.0破解

    RAR registration data Federal Agency for Education 1000000 PC usage license UID=b621cca9a84bc5deffbf ...

  8. 会修修的莫队--BZOJ2120: 数颜色

    $n \leq 10000$的数列,$m \leq 10000$个操作,一:单点修改:二:查区间不同数字个数.修改数$\leq 1000$,数字$\leq 1000000$. 我不会告诉您这是三种写法 ...

  9. hihoCoder #1014 : Trie树 [ Trie ]

    传送门 #1014 : Trie树 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi和小Ho是一对好朋友,出生在信息化社会的他们对编程产生了莫大的兴趣,他们约定好互 ...

  10. Codeforces Round #297 (Div. 2) D. Arthur and Walls [ 思维 + bfs ]

    传送门 D. Arthur and Walls time limit per test 2 seconds memory limit per test 512 megabytes input stan ...