Skip to content

Commit d356665

Browse files
committed
整理
1 parent 305efd6 commit d356665

File tree

357 files changed

+238
-693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+238
-693
lines changed
+15-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
eclipse.preferences.version=1
22
encoding//QListView/CustomWidgetSortItem.py=utf-8
33
encoding//QListView/SortItemByRole.py=utf-8
4+
encoding//QMessageBox/CustomColorIcon.py=utf-8
5+
encoding//QProgressBar/Lib/WaterRippleProgressBar.py=utf-8
6+
encoding//QProgressBar/MetroCircleProgress.py=utf-8
7+
encoding//QProgressBar/PercentProgressBar.py=utf-8
8+
encoding//QProgressBar/SimpleStyle.py=utf-8
9+
encoding//QProgressBar/WaterProgressBar.py=utf-8
410
encoding//QProxyStyle/Lib/TabBarStyle.py=utf-8
511
encoding//QProxyStyle/TabTextDirection.py=utf-8
12+
encoding//QPushButton/BottomLineProgress.py=utf-8
13+
encoding//QPushButton/FontRotate.py=utf-8
14+
encoding//QPushButton/NormalStyle.py=utf-8
15+
encoding//QScrollBar/StyleScrollBar.py=utf-8
16+
encoding//QSlider/PaintQSlider.py=utf-8
17+
encoding//QSlider/QssQSlider.py=utf-8
618
encoding//QSplitter/RewriteHandle.py=utf-8
719
encoding//QThread/moveToThread.py=utf-8
820
encoding//QTreeWidget/ParsingJson.py=utf-8
921
encoding//QWebView/DreamTree.py=utf-8
10-
encoding//\u7F8E\u5316/QProgressBar/Metro\u8FDB\u5EA6\u6761.py=utf-8
11-
encoding//\u7F8E\u5316/QProgressBar/\u6C34\u6CE2\u7EB9\u8FDB\u5EA6\u6761/ProgressBar.py=utf-8
12-
encoding//\u7F8E\u5316/QProgressBar/\u6C34\u6CE2\u7EB9\u8FDB\u5EA6\u6761/\u6C34\u6CE2\u7EB9\u8FDB\u5EA6\u6761.py=utf-8
13-
encoding//\u7F8E\u5316/QSlider/PaintQSlider.py=utf-8
14-
encoding//\u7F8E\u5316/QWidget/CustomPaintWidget.py=utf-8
15-
encoding//\u7F8E\u5316/QWidget/CustomWidget.py=utf-8
16-
encoding//\u7F8E\u5316/QWidget/QWidget\u6837\u5F0F\u6D4B\u8BD5.py=utf-8
22+
encoding//QWidget/Lib/CustomPaintWidget.py=utf-8
23+
encoding//QWidget/Lib/CustomWidget.py=utf-8
24+
encoding//QWidget/WidgetStyle.py=utf-8

QCalendarWidget/README.md

+2

QGraphicsDropShadowEffect/README.md

+4-3

QMessageBox/CustomColorIcon.py

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
'''
5+
Created on 2018年1月17日
6+
@author: Irony."[讽刺]
7+
@site: https://pyqt5.com , https://github.com/892768447
8+
@email: 892768447@qq.com
9+
@file: CustomBtnIcon
10+
@description:
11+
'''
12+
13+
__Author__ = "By: Irony.\"[讽刺]\nQQ: 892768447\nEmail: 892768447@qq.com"
14+
__Copyright__ = "Copyright (c) 2018 Irony.\"[讽刺]"
15+
__Version__ = "Version 1.0"
16+
17+
import sys
18+
19+
from PyQt5.QtWidgets import QApplication, QMessageBox
20+
21+
22+
app = QApplication(sys.argv)
23+
app.setStyleSheet('''QDialogButtonBox {
24+
dialogbuttonbox-buttons-have-icons: 1;
25+
dialog-ok-icon: url(Data/icons/Ok.png);
26+
dialog-open-icon: url(Data/icons/Open.png);
27+
dialog-save-icon: url(Data/icons/Save.png);
28+
dialog-cancel-icon: url(Data/icons/Cancel.png);
29+
}
30+
31+
#qt_msgbox_label {
32+
color: red;
33+
background: green;
34+
}
35+
36+
#qt_msgboxex_icon_label {
37+
background: red;
38+
}
39+
40+
QMessageBox {
41+
background: black;
42+
messagebox-information-icon: url(Data/icons/Close.png);
43+
}
44+
45+
QMessageBox QPushButton {
46+
padding: 2px;
47+
border-radius: 5px;
48+
background: white;
49+
}
50+
51+
QMessageBox QPushButton:hover {
52+
background: darkCyan;
53+
}
54+
55+
QMessageBox QPushButton[text="Reset"] {
56+
background: red;
57+
}
58+
59+
QMessageBox QPushButton[text="Apply"] {
60+
background: cyan;
61+
qproperty-icon: url(Data/icons/Apply.png);
62+
}
63+
''')
64+
QMessageBox.information(None, "information", "消息",
65+
QMessageBox.Apply |
66+
QMessageBox.Cancel |
67+
QMessageBox.Close |
68+
QMessageBox.Discard |
69+
QMessageBox.Help |
70+
QMessageBox.No |
71+
QMessageBox.Ok |
72+
QMessageBox.Open |
73+
QMessageBox.Reset |
74+
QMessageBox.Save |
75+
QMessageBox.Yes)
76+
sys.exit()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

QMessageBox/README.md

+6-1
15.1 KB

美化/QProgressBar/水波纹进度条/ProgressBar.py QProgressBar/Lib/WaterRippleProgressBar.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# author: Irony
66
# site: https://pyqt5.com , https://github.com/892768447
77
# email: 892768447@qq.com
8-
# file: ProgressBar
8+
# file: WaterRippleProgressBar
99
# description:
1010

1111
__Author__ = """By: Irony
@@ -21,7 +21,7 @@
2121
from PyQt5.QtWidgets import QProgressBar
2222

2323

24-
class ProgressBar(QProgressBar):
24+
class WaterRippleProgressBar(QProgressBar):
2525

2626
# 浪高百分比
2727
waterHeight = 1
@@ -39,7 +39,7 @@ class ProgressBar(QProgressBar):
3939
waterColor2 = QColor(33, 178, 148, 100)
4040

4141
def __init__(self, *args, **kwargs):
42-
super(ProgressBar, self).__init__(*args, **kwargs)
42+
super(WaterRippleProgressBar, self).__init__(*args, **kwargs)
4343
self._offset = 0
4444
# 每隔100ms刷新波浪(模拟波浪动态)
4545
self._updateTimer = QTimer(self, timeout=self.update)
@@ -48,17 +48,17 @@ def __init__(self, *args, **kwargs):
4848
def setRange(self, minValue, maxValue):
4949
if minValue == maxValue == 0:
5050
return # 不允许设置busy状态
51-
super(ProgressBar, self).setRange(minValue, maxValue)
51+
super(WaterRippleProgressBar, self).setRange(minValue, maxValue)
5252

5353
def setMinimum(self, value):
5454
if value == self.maximum() == 0:
5555
return # 不允许设置busy状态
56-
super(ProgressBar, self).setMinimum(value)
56+
super(WaterRippleProgressBar, self).setMinimum(value)
5757

5858
def setMaximum(self, value):
5959
if value == self.minimum() == 0:
6060
return # 不允许设置busy状态
61-
super(ProgressBar, self).setMaximum(value)
61+
super(WaterRippleProgressBar, self).setMaximum(value)
6262

6363
def setWaterHeight(self, height):
6464
"""设置浪高"""
@@ -133,6 +133,10 @@ def paintEvent(self, event):
133133
# 设置没有画笔
134134
painter.setPen(Qt.NoPen)
135135

136+
if not self.styleType:
137+
# 圆形
138+
painter.setClipPath(bgPath)
139+
136140
# 先整体绘制背景,然后再在背景上方绘制两条波浪
137141
painter.save()
138142
painter.setBrush(self.backgroundColor)
File renamed without changes.

美化/QProgressBar/百分比进度条.py QProgressBar/PercentProgressBar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@author: Irony
77
@site: https://pyqt5.com , https://github.com/892768447
88
@email: 892768447@qq.com
9-
@file: 界面美化.各类进度条.PercentProgressBar
9+
@file: PercentProgressBar
1010
@description:
1111
"""
1212
from PyQt5.QtCore import pyqtProperty, QSize, Qt, QRectF, QTimer

QProgressBar/README.md

+32
File renamed without changes.

美化/QProgressBar/简单样式表美化.py QProgressBar/SimpleStyle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@author: Irony."[讽刺]
77
@site: https://pyqt5.com , https://github.com/892768447
88
@email: 892768447@qq.com
9-
@file: ProgressBar
9+
@file: SimpleStyle
1010
@description:
1111
'''
1212
from random import randint

美化/QProgressBar/水波纹进度条/水波纹进度条.py QProgressBar/WaterProgressBar.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# author: Irony
66
# site: https://pyqt5.com , https://github.com/892768447
77
# email: 892768447@qq.com
8-
# file: TestWidget
8+
# file: WaterProgressBar
99
# description:
1010

1111
__Author__ = """By: Irony
@@ -23,7 +23,7 @@
2323
from PyQt5.QtWidgets import QWidget, QFormLayout, QRadioButton, QPushButton,\
2424
QColorDialog
2525

26-
from ProgressBar import ProgressBar # @UnresolvedImport
26+
from Lib.WaterRippleProgressBar import WaterRippleProgressBar # @UnresolvedImport
2727

2828

2929
class Window(QWidget):
@@ -32,7 +32,7 @@ def __init__(self, *args, **kwargs):
3232
super(Window, self).__init__(*args, **kwargs)
3333
self.resize(800, 600)
3434

35-
self.bar = ProgressBar(self)
35+
self.bar = WaterRippleProgressBar(self)
3636
self.bar.setMinimumSize(400, 400)
3737
self.bar.setMaximumSize(400, 400)
3838

美化/QPushButton/按钮进度动画/按钮底部线条动画.py QPushButton/BottomLineProgress.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def start(self):
7474
return self.stop()
7575
self.loadingThread = LoadingThread(self)
7676
self.loadingThread.valueChanged.connect(self.setPercent)
77-
self._timer.start(200) # 200ms
77+
self._timer.start(100) # 100ms
7878
self.loadingThread.start()
7979
self.setText(self._waitText)
8080

美化/QPushButton/按钮进度动画/按钮字体旋转动画.py QPushButton/FontRotate.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def update(self, _=None):
8484
app = QApplication(sys.argv)
8585
# 加载字体到字体库中
8686
QFontDatabase.addApplicationFont(
87-
"Fonts/FontAwesome/fontawesome-webfont.ttf")
87+
"Data/Fonts/FontAwesome/fontawesome-webfont.ttf")
8888
w = PushButtonFont("点击加载")
89+
w.resize(400, 400)
8990
w.show()
9091
sys.exit(app.exec_())

美化/QPushButton/按钮常见样式.py QPushButton/NormalStyle.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@author: Irony."[讽刺]
77
@site: https://pyqt5.com , https://github.com/892768447
88
@email: 892768447@qq.com
9-
@file: ButtonHover
9+
@file: NormalStyle
1010
@description:
1111
'''
1212
import sys

QPushButton/README.md

+22

0 commit comments

Comments
 (0)