Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
k54kdk
PyQt Fluent Widgets
提交
88f7ca83
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看板
提交
88f7ca83
编写于
3月 30, 2023
作者:
之一Yo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加基本输入界面的注释
上级
010b8cdd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
2 deletion
+11
-2
examples/gallery/app/view/basic_input_interface.py
examples/gallery/app/view/basic_input_interface.py
+11
-2
未找到文件。
examples/gallery/app/view/basic_input_interface.py
浏览文件 @
88f7ca83
...
...
@@ -20,16 +20,17 @@ class BasicInputInterface(GalleryInterface):
parent
=
parent
)
# simple push button
self
.
addExampleCard
(
self
.
tr
(
'A simple button with text content'
),
PushButton
(
self
.
tr
(
'Standard push button'
)),
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py'
)
# tool button
button
=
ToolButton
(
'app/resource/images/kunkun.png'
)
button
.
setIconSize
(
QSize
(
40
,
40
))
button
.
clicked
.
connect
(
lambda
:
QSound
.
play
(
'app/resource/audio/ZhiYinJi.wav'
))
# button.clicked.connect(lambda: QSound.play('app/resource/audio/ZhiYinJi.wav'))
button
.
resize
(
70
,
70
)
self
.
addExampleCard
(
self
.
tr
(
'A button with graphical content'
),
...
...
@@ -37,24 +38,28 @@ class BasicInputInterface(GalleryInterface):
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py'
)
# primary color button
self
.
addExampleCard
(
self
.
tr
(
'Accent style applied to button'
),
PrimaryPushButton
(
self
.
tr
(
'Accent style button'
)),
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py'
)
# hyperlink button
self
.
addExampleCard
(
self
.
tr
(
'A hyperlink button that navigates to a URI'
),
HyperlinkButton
(
'http://github.com'
,
self
.
tr
(
'GitHub home page'
)),
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/button/demo.py'
)
# 2-state check box
self
.
addExampleCard
(
self
.
tr
(
'A 2-state CheckBox'
),
CheckBox
(
self
.
tr
(
'Two-state CheckBox'
)),
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/check_box/demo.py'
)
# 3-state check box
checkBox
=
CheckBox
(
self
.
tr
(
'Three-state CheckBox'
))
checkBox
.
setTristate
(
True
)
self
.
addExampleCard
(
...
...
@@ -63,6 +68,7 @@ class BasicInputInterface(GalleryInterface):
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/check_box/demo.py'
)
# combo box
comboBox
=
ComboBox
()
comboBox
.
addItems
([
'shoko 🥰'
,
'西宫硝子 😊'
,
'一级棒卡哇伊的硝子酱 😘'
])
comboBox
.
setCurrentIndex
(
0
)
...
...
@@ -73,6 +79,7 @@ class BasicInputInterface(GalleryInterface):
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/combo_box/demo.py'
)
# radio button
radioWidget
=
QWidget
()
radioLayout
=
QVBoxLayout
(
radioWidget
)
radioLayout
.
setContentsMargins
(
2
,
0
,
0
,
0
)
...
...
@@ -94,6 +101,7 @@ class BasicInputInterface(GalleryInterface):
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/radio_button/demo.py'
)
# horizontal slider
slider
=
Slider
(
Qt
.
Horizontal
)
slider
.
setRange
(
0
,
100
)
slider
.
setValue
(
30
)
...
...
@@ -104,6 +112,7 @@ class BasicInputInterface(GalleryInterface):
'https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/examples/slider/demo.py'
)
# switch button
self
.
switchButton
=
SwitchButton
(
self
.
tr
(
'Off'
))
self
.
switchButton
.
checkedChanged
.
connect
(
self
.
onSwitchCheckedChanged
)
self
.
addExampleCard
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录