Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
k54kdk
PyQt Fluent Widgets
提交
35c67909
P
PyQt Fluent Widgets
项目概览
k54kdk
/
PyQt Fluent Widgets
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PyQt Fluent Widgets
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
35c67909
编写于
1月 25, 2023
作者:
之一Yo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加对话框的返回值
上级
2f3bf47f
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
36 addition
and
36 deletion
+36
-36
README.md
README.md
+3
-4
docs/source/index.rst
docs/source/index.rst
+3
-3
examples/dialog/demo.py
examples/dialog/demo.py
+4
-1
examples/message_dialog/demo.py
examples/message_dialog/demo.py
+4
-1
qfluentwidgets/__init__.py
qfluentwidgets/__init__.py
+2
-2
qfluentwidgets/components/dialog_box/dialog.py
qfluentwidgets/components/dialog_box/dialog.py
+2
-2
qfluentwidgets/components/dialog_box/message_dialog.py
qfluentwidgets/components/dialog_box/message_dialog.py
+2
-0
qfluentwidgets/components/settings/expand_setting_card.py
qfluentwidgets/components/settings/expand_setting_card.py
+15
-22
setup.py
setup.py
+1
-1
未找到文件。
README.md
浏览文件 @
35c67909
...
...
@@ -9,17 +9,16 @@
</p>
<p
align=
"center"
>
<a
style=
"text-decoration:none"
>
<img
src=
"https://img.shields.io/badge/P
ython-3.6+-blue.svg?color=00B16A"
alt=
"Python 3.6+
"
/>
<img
src=
"https://img.shields.io/badge/P
latform-Win32%20|%20Linux%20|%20macOS-blue?color=#4ec820"
alt=
"Platform Win32 | Linux | macOS
"
/>
</a>
<a
style=
"text-decoration:none"
>
<img
src=
"https://
img.shields.io/badge/PyQt-5.15.6-blue?color=00B16A"
alt=
"PyQt 5.15.6
"
/>
<img
src=
"https://
static.pepy.tech/personalized-badge/pyqt-fluent-widgets?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads"
alt=
"Download
"
/>
</a>
<a
style=
"text-decoration:none"
>
<img
src=
"https://img.shields.io/badge/
Platform-Win32%20|%20Linux%20|%20macOS-blue?color=00B16A"
alt=
"Platform Win32 | Linux | macOS
"
/>
<img
src=
"https://img.shields.io/badge/
License-MIT-blue?color=#4ec820"
alt=
"MIT
"
/>
</a>
</p>
...
...
docs/source/index.rst
浏览文件 @
35c67909
...
...
@@ -21,15 +21,15 @@
<p align="center">
<a style="text-decoration:none">
<img src="https://img.shields.io/badge/P
ython-3.6+-blue.svg?color=00B16A" alt="Python 3.6+
"/>
<img src="https://img.shields.io/badge/P
latform-Win32%20|%20Linux%20|%20macOS-blue?color=#4ec820" alt="Platform Win32 | Linux | macOS
"/>
</a>
<a style="text-decoration:none">
<img src="https://
img.shields.io/badge/PyQt-5.15.6-blue?color=00B16A" alt="PyQt 5.15.6
"/>
<img src="https://
static.pepy.tech/personalized-badge/pyqt-fluent-widgets?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads" alt="Download
"/>
</a>
<a style="text-decoration:none">
<img src="https://img.shields.io/badge/
Platform-Win32%20|%20Linux%20|%20macOS-blue?color=00B16A" alt="Platform Win32 | Linux | macOS
"/>
<img src="https://img.shields.io/badge/
License-MIT-blue?color=#4ec820" alt="MIT
"/>
</a>
</p>
...
...
examples/dialog/demo.py
浏览文件 @
35c67909
...
...
@@ -20,7 +20,10 @@ class Window(QWidget):
title
=
'Are you sure you want to delete the folder?'
content
=
"""If you delete the "Music" folder from the list, the folder will no longer appear in the list, but will not be deleted."""
w
=
Dialog
(
title
,
content
,
self
)
w
.
exec
()
if
w
.
exec
():
print
(
'Yes button is pressed'
)
else
:
print
(
'Cancel button is pressed'
)
if
__name__
==
'__main__'
:
...
...
examples/message_dialog/demo.py
浏览文件 @
35c67909
...
...
@@ -20,7 +20,10 @@ class Window(QWidget):
title
=
'Are you sure you want to delete the folder?'
content
=
"""If you delete the "Music" folder from the list, the folder will no longer appear in the list, but will not be deleted."""
w
=
MessageDialog
(
title
,
content
,
self
)
w
.
exec
()
if
w
.
exec
():
print
(
'Yes button is pressed'
)
else
:
print
(
'Cancel button is pressed'
)
if
__name__
==
'__main__'
:
...
...
qfluentwidgets/__init__.py
浏览文件 @
35c67909
"""
PyQt-Fluent-Widgets
===================
A
library of fluent design widgets
.
A
fluent design widgets library based on PyQt5
.
Documentation is available in the docstrings and
online at https://pyqt-fluent-widgets.readthedocs.io.
...
...
@@ -10,7 +10,7 @@ online at https://pyqt-fluent-widgets.readthedocs.io.
:license: MIT, see LICENSE for more details.
"""
__version__
=
"0.1.
1
"
__version__
=
"0.1.
6
"
from
.components
import
*
from
.common
import
*
...
...
qfluentwidgets/components/dialog_box/dialog.py
浏览文件 @
35c67909
...
...
@@ -64,11 +64,11 @@ class Dialog(FramelessDialog):
def
__onCancelButtonClicked
(
self
):
self
.
cancelSignal
.
emit
()
self
.
deleteLater
()
self
.
reject
()
def
__onYesButtonClicked
(
self
):
self
.
yesSignal
.
emit
()
self
.
deleteLater
()
self
.
accept
()
def
__setQss
(
self
):
""" 设置层叠样式 """
...
...
qfluentwidgets/components/dialog_box/message_dialog.py
浏览文件 @
35c67909
...
...
@@ -50,11 +50,13 @@ class MessageDialog(MaskDialogBase):
def
__onCancelButtonClicked
(
self
):
self
.
cancelSignal
.
emit
()
self
.
setResult
(
self
.
Rejected
)
self
.
close
()
def
__onYesButtonClicked
(
self
):
self
.
setEnabled
(
False
)
self
.
yesSignal
.
emit
()
self
.
setResult
(
self
.
Accepted
)
self
.
close
()
def
__setQss
(
self
):
...
...
qfluentwidgets/components/settings/expand_setting_card.py
浏览文件 @
35c67909
# coding:utf-8
from
PyQt5.QtCore
import
(
Qt
,
QPropertyAnimation
,
pyqtProperty
,
QEasingCurve
,
from
PyQt5.QtCore
import
(
Q
Event
,
Q
t
,
QPropertyAnimation
,
pyqtProperty
,
QEasingCurve
,
QParallelAnimationGroup
,
QRect
,
QSize
,
QPoint
)
from
PyQt5.QtGui
import
QColor
,
QPixmap
,
QPainter
from
PyQt5.QtWidgets
import
QFrame
,
QWidget
,
QAbstractButton
,
QApplication
...
...
@@ -125,6 +125,7 @@ class ExpandSettingCard(QFrame):
setStyleSheet
(
self
.
card
,
'expand_setting_card'
)
setStyleSheet
(
self
,
'expand_setting_card'
)
self
.
card
.
installEventFilter
(
self
)
self
.
aniGroup
.
finished
.
connect
(
self
.
__onAniFinished
)
self
.
expandButton
.
clicked
.
connect
(
self
.
toggleExpand
)
...
...
@@ -170,27 +171,19 @@ class ExpandSettingCard(QFrame):
self
.
card
.
resize
(
self
.
width
(),
self
.
card
.
height
())
self
.
view
.
resize
(
self
.
width
(),
self
.
view
.
height
())
def
enterEvent
(
self
,
e
):
super
().
enterEvent
(
e
)
self
.
expandButton
.
setHover
(
True
)
def
leaveEvent
(
self
,
e
):
super
().
leaveEvent
(
e
)
self
.
expandButton
.
setHover
(
False
)
def
mousePressEvent
(
self
,
e
):
super
().
mousePressEvent
(
e
)
if
e
.
button
()
==
Qt
.
LeftButton
:
self
.
expandButton
.
setPressed
(
True
)
def
mouseReleaseEvent
(
self
,
e
):
super
().
mouseReleaseEvent
(
e
)
if
e
.
button
()
==
Qt
.
LeftButton
:
self
.
expandButton
.
setPressed
(
False
)
self
.
expandButton
.
click
()
def
sizeHint
(
self
):
return
self
.
size
()
def
eventFilter
(
self
,
obj
,
e
):
if
obj
is
self
.
card
:
if
e
.
type
()
==
QEvent
.
Enter
:
self
.
expandButton
.
setHover
(
True
)
elif
e
.
type
()
==
QEvent
.
Leave
:
self
.
expandButton
.
setHover
(
False
)
elif
e
.
type
()
==
QEvent
.
MouseButtonPress
and
e
.
button
()
==
Qt
.
LeftButton
:
self
.
expandButton
.
setPressed
(
True
)
elif
e
.
type
()
==
QEvent
.
MouseButtonRelease
and
e
.
button
()
==
Qt
.
LeftButton
:
self
.
expandButton
.
setPressed
(
False
)
self
.
expandButton
.
click
()
return
super
().
eventFilter
(
obj
,
e
)
def
__onAniFinished
(
self
):
""" expand animation finished slot """
...
...
setup.py
浏览文件 @
35c67909
...
...
@@ -6,7 +6,7 @@ with open('README.md', encoding='utf-8') as f:
setuptools
.
setup
(
name
=
"PyQt-Fluent-Widgets"
,
version
=
"0.1.
5
"
,
version
=
"0.1.
6
"
,
keywords
=
"pyqt fluent widgets"
,
author
=
"zhiyiYo"
,
author_email
=
"shokokawaii@outlook.com"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录