提交 ae9e18e4 编写于 作者: 之一Yo's avatar 之一Yo

更新文档

上级 fd44d199
...@@ -68,9 +68,6 @@ You can use PyQt-Fluent-Widgets in QtDesigner directly by running `python ./tool ...@@ -68,9 +68,6 @@ You can use PyQt-Fluent-Widgets in QtDesigner directly by running `python ./tool
## Support ## Support
If this project helps you a lot and you want to support the development and maintenance of this project, feel free to sponsor me via [爱发电](https://afdian.net/a/zhiyiYo) or [ko-fi](https://ko-fi.com/zhiyiYo). Your support is highly appreciated 🥰 If this project helps you a lot and you want to support the development and maintenance of this project, feel free to sponsor me via [爱发电](https://afdian.net/a/zhiyiYo) or [ko-fi](https://ko-fi.com/zhiyiYo). Your support is highly appreciated 🥰
## Join with Us
You can join [PFW 小圈子](https://afdian.net/group/e61a3db8f39911ed919852540025c377) or [Discord channel](https://discord.gg/mYZME3wraK) to communicate with us. You can share your findings, thoughts and ideas on improving PyQt-Fluent-Widgets 🚀
## See Also ## See Also
Here are some projects that use PyQt-Fluent-Widgets: Here are some projects that use PyQt-Fluent-Widgets:
* [**zhiyiYo/Groove**: A cross-platform music player based on PyQt5](https://github.com/zhiyiYo/Groove) * [**zhiyiYo/Groove**: A cross-platform music player based on PyQt5](https://github.com/zhiyiYo/Groove)
......
...@@ -69,9 +69,6 @@ python demo.py ...@@ -69,9 +69,6 @@ python demo.py
> **Note** > **Note**
> 推荐在虚拟环境中安装 pyqt5-tools 和 PyQt-Fluent-Widgets,并确保 PyQt5-Frameless-Window 的版本号 >= 0.2.7,不然可能出现各种奇怪的问题。 > 推荐在虚拟环境中安装 pyqt5-tools 和 PyQt-Fluent-Widgets,并确保 PyQt5-Frameless-Window 的版本号 >= 0.2.7,不然可能出现各种奇怪的问题。
## 加入我们🚩
可以在 [PFW 小圈子](https://afdian.net/group/e61a3db8f39911ed919852540025c377) 或者 [ Discord ](https://discord.gg/mYZME3wraK) 上和我们一起交流探讨,分享自己对这个组件库的新发现和新想法 🚀
## 另见👀 ## 另见👀
下面是一些使用了 PyQt-Fluent-Widgets 的项目: 下面是一些使用了 PyQt-Fluent-Widgets 的项目:
* [**zhiyiYo/Groove**: A cross-platform music player based on PyQt5](https://github.com/zhiyiYo/Groove) * [**zhiyiYo/Groove**: A cross-platform music player based on PyQt5](https://github.com/zhiyiYo/Groove)
......
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2021, zhiyiYo
# This file is distributed under the same license as the PyQt-Fluent-Widgets
# package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PyQt-Fluent-Widgets \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-01 17:56+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.11.0\n"
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_picker/index.rst:2
#: 2c7a4eb494b047b7b2d1d878a5f8922d
msgid "calendar_picker"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_picker/index.rst:8
#: a61263caff454426a5c4ef23aaba94c6
msgid "Module Contents"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_picker/index.rst:18:<autosummary>:1
#: 73ca36eaf2804370a7b3929299e0cd0a
msgid ""
":py:obj:`CalendarPicker "
"<qfluentwidgets.components.date_time.calendar_picker.CalendarPicker>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_picker/index.rst:23
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_picker/index.rst:18:<autosummary>:1
#: 9f8c9513514745018e2949f4c9b6c9af abb5f98b738344ab90bb1e0a3b89e2b5
msgid "Calendar picker"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_picker/index.rst:21
#: be59c5e217d34b2eb5088f7d3db90341
msgid "Bases: :py:obj:`PyQt5.QtWidgets.QPushButton`"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_picker/index.rst:31
#: 67e9fa08ecb8439dbd377d39c5b187a1
msgid "set the selected date"
msgstr ""
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2021, zhiyiYo
# This file is distributed under the same license as the PyQt-Fluent-Widgets
# package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PyQt-Fluent-Widgets \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-01 17:56+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <LL@li.org>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.11.0\n"
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:2
#: 2c988020c6f641cf92836e19597b1272
msgid "calendar_view"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:8
#: b1e547b688a147e6bcb8cdb9b6ebbf29
msgid "Module Contents"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: bdd754a4d7bd4f36a49c2d226646254a
msgid ""
":py:obj:`ScrollButton "
"<qfluentwidgets.components.date_time.calendar_view.ScrollButton>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:35
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: a2d093ab1b4245b08128b7412b6c7ae1 b0d6cdd4877b4241939a36a126e6803d
msgid "Scroll button"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 55eeb982b4f845d085eaa50d34a514e2
msgid ""
":py:obj:`ScrollItemDelegate "
"<qfluentwidgets.components.date_time.calendar_view.ScrollItemDelegate>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 0e7a0115ef4546eabf7dbd91ce6afb95
msgid ""
":py:obj:`YearScrollItemDelegate "
"<qfluentwidgets.components.date_time.calendar_view.YearScrollItemDelegate>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:65
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: d2509d80d136456c9871969bedd049e0 f266246c911744408c5821ec92897cf3
msgid "Year scroll item delegate"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: e76738aad06546ffa3e41fbc96f750e0
msgid ""
":py:obj:`DayScrollItemDelegate "
"<qfluentwidgets.components.date_time.calendar_view.DayScrollItemDelegate>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:72
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 44f23ec1710e4743b26aabaf8d728d2c cdbc6abca6954d29afa87622c6696187
msgid "Day scroll item delegate"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: d09859a212e043bf9d314f12cfd5409c
msgid ""
":py:obj:`ScrollViewBase "
"<qfluentwidgets.components.date_time.calendar_view.ScrollViewBase>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:79
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 5da98688b4f34612972789c7fcd67b41 d32737ac0bd34920bbe0f13afb1e4da3
msgid "Scroll view base class"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 58dea08db4b44a6190efd510d2f0609f
msgid ""
":py:obj:`CalendarViewBase "
"<qfluentwidgets.components.date_time.calendar_view.CalendarViewBase>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:116
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 20f6bbe661d94d29ac72f7a0f0b43941 d9155cc883074a51a6c52e048a5c5020
msgid "Calendar view base class"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: d7230c4edbfc43208ba89f212702cccf
msgid ""
":py:obj:`YearScrollView "
"<qfluentwidgets.components.date_time.calendar_view.YearScrollView>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:144
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 1322c5c3909947f8ab006d1c61a002e6 acd53b1830d64ff5a16063d9ca72aff3
msgid "Year scroll view"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: dfd726d11b5042acb88bd593addf276f
msgid ""
":py:obj:`YearCalendarView "
"<qfluentwidgets.components.date_time.calendar_view.YearCalendarView>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:157
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 679c78e45ca14a2cbbd1ad9d7a5c88e7 a2c0afb24b22417ab86f443186ee8af8
msgid "Year calendar view"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 98668e45068e45188a784862e878ffba
msgid ""
":py:obj:`MonthScrollView "
"<qfluentwidgets.components.date_time.calendar_view.MonthScrollView>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:164
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 08b7e51e6a8540d0a58d4446cab0865f c1deeb35b77643309bde47d0b2377af5
msgid "Month scroll view"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 116e14b6686b4d65a84e848974987b53
msgid ""
":py:obj:`MonthCalendarView "
"<qfluentwidgets.components.date_time.calendar_view.MonthCalendarView>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:177
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: b5ba0d7f3764434d8798be09fb6e2cf2 cddbcdf66ee745d4ad203141f4d1ebe6
msgid "Month calendar view"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: d4c5de70160640f7ae248cbdb71451e5
msgid ""
":py:obj:`DayScrollView "
"<qfluentwidgets.components.date_time.calendar_view.DayScrollView>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:187
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 88bef63906e64b5793c2d49efffc6e8c b320d066f1ff465db2f865d3506139e0
msgid "Day scroll view"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 3673635cfc6d4e188c04900e134f0626
msgid ""
":py:obj:`DayCalendarView "
"<qfluentwidgets.components.date_time.calendar_view.DayCalendarView>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:212
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 1574d319bf1c49c181d119ae5abfe608 26bcea1b968f4b9e867d0bef87b4dca9
msgid "Day calendar view"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 3c458b4753514a73bc8d3c72d5dc4358
msgid ""
":py:obj:`CalendarView "
"<qfluentwidgets.components.date_time.calendar_view.CalendarView>`\\"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:225
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:30:<autosummary>:1
#: 72229873b28d4bbba6daf82c32ac2110 e35f8e474e5748b6bca3c8198b17a393
msgid "Calendar view"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:33
#: 866f6ea5fea445b9849da45bbbddfcd4
msgid ""
"Bases: "
":py:obj:`qfluentwidgets.components.widgets.button.TransparentToolButton`"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:43
#: aae780aadcb64f04b86a3dd7dbb68305
msgid "Bases: :py:obj:`PyQt5.QtWidgets.QStyledItemDelegate`"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:63
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:70
#: 572f849630224896a8b0b47ec88e09ea efd01b2bf1ff46008c461132eb52d059
msgid "Bases: :py:obj:`ScrollItemDelegate`"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:77
#: 316cd424f3554e9d80d16f9fbf8be3c1
msgid "Bases: :py:obj:`PyQt5.QtWidgets.QListWidget`"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:114
#: f5a470f5714246b89a580bbae72f71e4
msgid "Bases: :py:obj:`PyQt5.QtWidgets.QFrame`"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:142
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:162
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:185
#: 029bbbe0e3274575a34395cccc15e45f e66a198e5daf4c7ababf9644fd0e0824
#: e8d7e62817804d93853558edbefb9dd7
msgid "Bases: :py:obj:`ScrollViewBase`"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:155
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:175
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:210
#: 2acbf87d60c44a9db9d35db9f35db55b 8cfee58132b44720bee3ba64d8959b52
#: f3d094c7231c44c1aa7bf592b633953c
msgid "Bases: :py:obj:`CalendarViewBase`"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:223
#: fcb82323d5dd467a8e956ea58b486e14
msgid "Bases: :py:obj:`PyQt5.QtWidgets.QWidget`"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:233
#: f729fa3364464cdd853c5a9ef6231789
msgid "add shadow to dialog"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:238
#: 1b9cacd39a1b4df1a3dbfe4a60f4b47e
msgid "set the selected date"
msgstr ""
#: ../../source/autoapi/qfluentwidgets/components/date_time/calendar_view/index.rst:243
#: b7767d3d96564500af8f9794b7ab51d2
msgid "show calendar view"
msgstr ""
...@@ -9,7 +9,7 @@ msgid "" ...@@ -9,7 +9,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PyQt-Fluent-Widgets \n" "Project-Id-Version: PyQt-Fluent-Widgets \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-15 19:39+0800\n" "POT-Creation-Date: 2023-06-01 21:04+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n" "Language: zh_CN\n"
...@@ -20,106 +20,103 @@ msgstr "" ...@@ -20,106 +20,103 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.11.0\n" "Generated-By: Babel 2.11.0\n"
#: ../../source/designer.md:1 5a95d288e5b1434b8cba86077e0cb406 #: ../../source/designer.rst:3 2204238be7a3465680a47ed103640176
msgid "Designer" msgid "Designer"
msgstr "设计师" msgstr "设计师"
#: ../../source/designer.md:2 ef3623206f4e4e8d8b85b1beb3001618 #: ../../source/designer.rst:5 3fa05afc8d5949abae31cd0aeb4a61ea
msgid "In Qt Designer, there are two ways to use PyQt-Fluent-Widgets." msgid "In Qt Designer, there are two ways to use PyQt-Fluent-Widgets."
msgstr "在 Qt Designer 中,有两种使用 PyQt-Fluent-Widgets 的方式。" msgstr "在 Qt Designer 中,有两种使用 PyQt-Fluent-Widgets 的方式。"
#: ../../source/designer.md:4 2f444d151c2a47c4b2caa2ed83dde361 #: ../../source/designer.rst:8 41b7e2220ef64401ad0e871e13769dbc
msgid "Promoting widget" msgid "Promoting widget"
msgstr "提升控件" msgstr "提升控件"
#: ../../source/designer.md:5 3690b8ac54994aaab5984e91367cac7c #: ../../source/designer.rst:10 b10f20ebdc394b3d9a7875d670447b9e
msgid "Right click on a widget, select the Promote to ... of context menu." msgid "Right click on a widget, select the ``Promote to ...`` of context menu."
msgstr "右击一个小部件,选择右击菜单上的 `提升为...`" msgstr "右击一个小部件,选择右击菜单上的 `提升为...`"
#: ../../source/designer.md:7 31af5abe19f34f9c9a4dd68974a4049c #: ../../source/designer.rst:12 867c82540dfd4ca7990a42ab7a3e7579
msgid "" msgid ""
"Promoting a widget indicates that it should be replaced with the " "Promoting a widget indicates that it should be replaced with the "
"specified subclass, in our case the qfluentwidgets.PushButton." "specified subclass, in our case the ``qfluentwidgets.PushButton``."
msgstr "`提升为` 的作用是把原生部件替换成自定义小部件,在这个例子中是 `qfluentwidgets.PushButton`。" msgstr "``提升为`` 的作用是把原生部件替换成自定义小部件,在这个例子中是 ``qfluentwidgets.PushButton``。"
#: ../../source/designer.md:11 05dc0a215c274eb9a5b882bf035318c3 #: ../../source/designer.rst:19 ed9db8020c2c4549b04f7e0a62458d6c
msgid "" msgid ""
"You will be presented with a dialog to specify the custom widget class " "You will be presented with a dialog to specify the custom widget class "
"the placeholder widget will become." "the placeholder widget will become."
msgstr "弹出的对话框上需要填写自定义的组件名。" msgstr "弹出的对话框上需要填写自定义的组件名。"
#: ../../source/designer.md:13 4c93b3604b014435b6e6b22ee051e3a2 #: ../../source/designer.rst:21 cd6f76c2e71246e48b5a80b92e012e15
msgid "" msgid ""
"The header file is the name of the Python module used to import the " "The header file is the name of the Python module used to import the "
"class, which is qfluentwidgets. Specify PushButton as the class name of " "class, which is ``qfluentwidgets``. Specify ``PushButton`` as the class "
"the widget to replace it with." "name of the widget to replace it with."
msgstr "头文件是组件库的包名 `qfluentwidgets`,提升的类名称为 `PushButton`。" msgstr "头文件是组件库的包名 ``qfluentwidgets``,提升的类名称为 ``PushButton``。"
#: ../../source/designer.md:17 8dd82bee173b4c1390fba4bde1825a81 #: ../../source/designer.rst:28 88353ef4699b44f48ddb3b39d58f56c7
msgid "" msgid ""
"Well, the widget is now promoted to fluent push button. But you won't be " "Well, the widget is now promoted to fluent push button. But you won't be "
"able to see any changes within Qt Designer. Save the window as " "able to see any changes within Qt Designer. Save the window as "
"mainwindow.ui and compile it to python code, you will see that the " "``mainwindow.ui`` and compile it to python code, you will see that the "
"PushButton is imported from qfluentwidgets package." "``PushButton`` is imported from ``qfluentwidgets`` package."
msgstr "完成提升后不会在设计师中看到任何变化,保存 ui 文件后编译为 py 代码,可以发现 `import` 的是 `PushButton`。" msgstr "完成提升后不会在设计师中看到任何变化,保存 ui 文件后编译为 py 代码,可以发现 ``import`` 的是 ``PushButton``。"
#: ../../source/designer.md:19 6e2249901ba54186bc253d932975d111 #: ../../source/designer.rst:31 be9f4ece8bd74256852195a605c460d7
msgid "Using plugin" msgid "Using plugin"
msgstr "使用插件" msgstr "使用插件"
#: ../../source/designer.md:20 a1ae6f86ce53459784ac25fb02a40e97 #: ../../source/designer.rst:33 8765a00158f74e3e80b4b6c9414e2229
msgid "create a virtual environment, conda is the recommended way." msgid "create a virtual environment, ``conda`` is the recommended way."
msgstr "创建一个虚拟环境,推荐使用 `conda`" msgstr "创建一个虚拟环境,推荐使用 ``conda``"
#: ../../source/designer.md:21 7eaaa14b44e6453b9e02c20240968282 #: ../../source/designer.rst:36 8019f1bdf317417087b734feb8500946
msgid "Activate virtual environment and run the following code in shell:" msgid "Activate virtual environment and run the following code in shell:"
msgstr "激活虚拟环境,在终端中输入下述命令安装所需的包:" msgstr "激活虚拟环境,在终端中输入下述命令安装所需的包:"
#: ../../source/designer.md:28 269fd5120ae744ff8ee1d8a31767130b #: ../../source/designer.rst:43 8ff0d9107fe546bba5e0d2a01907e9a1
msgid "Download the full code from PyQt-Fluent-Widgets Repo." msgid ""
"Download the full code from `PyQt-Fluent-Widgets Repo "
"<https://github.com/zhiyiYo/PyQt-Fluent-Widgets>`_."
msgstr "" msgstr ""
"从 [PyQt-Fluent-Widgets 仓库](https://github.com/zhiyiYo/PyQt-Fluent-" "从 `PyQt-Fluent-Widgets Repo <https://github.com/zhiyiYo/PyQt-Fluent-"
"Widgets) 下载完整代码" "Widgets>`_ 下载代码"
#: ../../source/designer.md:29 c7a39af0ccc84a2abe7bd92280652a51 #: ../../source/designer.rst:45 39b052e665fa487d963658549f6bdc21
msgid "" msgid ""
"Run python ./tools/designer.py to launch Qt Designer (You must use this " "Run ``python ./tools/designer.py`` to launch Qt Designer (You must use "
"way to launch Qt Designer)." "this way to launch Qt Designer)."
msgstr "运行 `python ./tools/designer.py` 来启动设计师软件(必须使用脚本启动)" msgstr "运行 ``python ./tools/designer.py`` 来启动设计师软件(必须使用脚本启动)"
#: ../../source/designer.md:31 edc60c4d30d44cbba0b8d3e3e0fe5c06 #: ../../source/designer.rst:48 c8a6b6f6546e439fb55d17b4ba1febfc
msgid "" msgid ""
"If everything goes smoothly, you will see all PyQt-Fluent-Widgets " "If everything goes smoothly, you will see all PyQt-Fluent-Widgets "
"components in the sidebar of Qt Designer. If the startup fails or the " "components in the sidebar of Qt Designer. If the startup fails or the "
"components of PyQt-Fluent-Widgets cannot be seen, the solution can be " "components of PyQt-Fluent-Widgets cannot be seen, the solution can be "
"found in #196." "found in `#196 <https://github.com/zhiyiYo/PyQt-Fluent-"
"Widgets/issues/196>`_."
msgstr "" msgstr ""
"一切无误的情况下能在侧边栏 Widget Box 中看到 PyQt-Fluent-Widgets 的组件。如果启动失败或者看不到 PyQt-" "一切无误的情况下能在侧边栏 Widget Box 中看到 PyQt-Fluent-Widgets 的组件。如果启动失败或者看不到 PyQt-"
"Fluent-Widgets 的组件,解决方案参见 [#196](https://github.com/zhiyiYo/PyQt-Fluent-" "Fluent-Widgets 的组件,解决方案参见 `#196 <https://github.com/zhiyiYo/PyQt-Fluent-Widgets/issues/196>`_。"
"Widgets/issues/196)。"
#: ../../source/designer.md:36 5099984215ec41569eb13ff147bc235a #: ../../source/designer.rst:56 fd5686a70ee1429e98e291745e3c9074
msgid "" msgid ""
"The plugin for PySide6 is unstable and may not start QtDesigner " "The plugin for PySide6 is unstable and may not start QtDesigner "
"successfully. It is recommended to use QtDesigner of PyQt5/6 to generate " "successfully. It is recommended to use QtDesigner of PyQt5/6 to generate "
"ui files." "ui files."
msgstr "PySide6 的插件不稳定,可能无法启动 QtDesigner,建议使用 PyQt5/Qt6 的 QtDesigner 来生成 ui 文件。" msgstr "PySide6 的插件不稳定,可能无法启动 QtDesigner,建议使用 PyQt5/Qt6 的 QtDesigner 来生成 ui 文件。"
#: ../../source/designer.md:38 761037286a514bec81013ff446e9a19f #: ../../source/designer.rst:58 b734f10f322549b29c0b4f6e2e2939f3
msgid "" msgid ""
"Note PyQt5 must upgrade PyQt5-Frameless-Window to 0.2.7 in order to use " "PyQt5 must upgrade PyQt5-Frameless-Window to 0.2.7 in order to use the "
"the plugin, while PySide6 and PyQt6 do not need to upgrading to frameless" "plugin, while PySide6 and PyQt6 do not need to upgrading to frameless "
" packages. PySide2 does not support plugins, but you can use PyQt5's " "packages. PySide2 does not support plugins, but you can use PyQt5's "
"QtDesigner to generate ui files and then compile them into py files using" "QtDesigner to generate ui files and then compile them into py files using"
" uic." " uic."
msgstr "" msgstr ""
"**注意**:PyQt5 要把 PyQt5-Frameless-Window 升级到 0.2.7 才能使用插件,PySide6 和 PyQt6 " "PyQt5 要把 PyQt5-Frameless-Window 升级到 0.2.7 才能使用插件,PySide6 和 PyQt6 "
"无需升级无边框包。PySide2 不支持插件,不过可以先用 PyQt5 的 QtDesigner 生成 ui 文件,然后用 uic 编译成 py " "无需升级无边框包。PySide2 不支持插件,不过可以先用 PyQt5 的 QtDesigner 生成 ui 文件,然后用 uic 编译成 py "
"文件。" "文件。"
#~ msgid "promote context menu"
#~ msgstr "右击菜单"
#~ msgid "promote dialog"
#~ msgstr ""
...@@ -9,7 +9,7 @@ msgid "" ...@@ -9,7 +9,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PyQt-Fluent-Widgets \n" "Project-Id-Version: PyQt-Fluent-Widgets \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-08 09:10+0800\n" "POT-Creation-Date: 2023-06-01 17:56+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n" "Language: zh_CN\n"
...@@ -20,38 +20,69 @@ msgstr "" ...@@ -20,38 +20,69 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.11.0\n" "Generated-By: Babel 2.11.0\n"
#: ../../source/quick-start.md:1 682ed71ddb194cb8938c2ce491e83485 #: ../../source/quick-start.rst:2 67e14cb0587e432fb68e3f7d8612bbc6
msgid "Quick start" msgid "Quick start"
msgstr "快速上手" msgstr "快速上手"
#: ../../source/quick-start.md:3 a8f4e066f4464d7d811d89200d2b8d35 #: ../../source/quick-start.rst:5 b1fce1fa80b0419c92bd07371d726e66
msgid "Install" msgid "Install"
msgstr "安装" msgstr "安装"
#: ../../source/quick-start.md:4 aa46b5b9d8bc46a284603a71862c6264 #: ../../source/quick-start.rst:7 e497cebbcbf14005b33388cc1bed714b
msgid "To install lite version (AcrylicLabel is not available) use pip:" msgid "To install lite version (``AcrylicLabel`` is not available) use pip:"
msgstr "安装轻量版(`AcrylicLabel` 不可用):" msgstr "安装轻量版(``AcrylicLabel`` 不可用):"
#: ../../source/quick-start.md:8 e867a91e9ac54f63a42a284708c0d3fa #: ../../source/quick-start.rst:13 66f5f4703cca47c7839e6030c742549f
msgid "Or install full-featured version use pip:" msgid "Or install full-featured version use pip:"
msgstr "安装完整版:" msgstr "安装完整版:"
#: ../../source/quick-start.md:13 1b5931d0f8454277b394768ba73d133e #: ../../source/quick-start.rst:19 056a50e362a74bd788375d08bd3d35cb
msgid "" msgid ""
"If you are using PySide2, PySide6 or PyQt6, you can download the code in " "If you are using PySide2, PySide6 or PyQt6, you can download the code in "
"PySide2, PySide6 or PyQt6 branch." "`PySide2 <https://github.com/zhiyiYo/PyQt-Fluent-"
msgstr "如果项目中使用的是 PySide2、PySide6 或者 PyQt6,可以在 [PySide2](https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PySide2)、[PySide6](https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PySide6) 和 [PyQt6](https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PyQt6) 分支下载对应的代码。" "Widgets/tree/PySide2>`__, `PySide6 <https://github.com/zhiyiYo/PyQt-"
"Fluent-Widgets/tree/PySide6>`__ or `PyQt6 <https://github.com/zhiyiYo"
"/PyQt-Fluent-Widgets/tree/PyQt6>`__ branch."
msgstr "如果使用的是 PySide2、PySide6 或者 PyQt6,可以在 `PySide2 <https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PySide2>`__, `PySide6 <https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PySide6>`__ or `PyQt6 <https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PyQt6>`__ 分支下载对应的代码。"
#: ../../source/quick-start.md:15 b72f91005f2c4d0b9bc1cc86734cfdfd #: ../../source/quick-start.rst:21 f950f3de3d574459a7de904fce8f9fc6
msgid ""
"Don't install PyQt-Fluent-Widgets, PyQt6-Fluent-Widgets, PySide2-Fluent-"
"Widgets and PySide6-Fluent-Widgets at the same time, because their "
"package names are all ``qfluentwidgets``."
msgstr "请勿同时安装 PyQt-Fluent-Widgets、PyQt6-Fluent-Widgets、PySide2-Fluent-Widgets 和 PySide6-Fluent-Widgets,因为他们的包名都是 `qfluentwidgets`"
#: ../../source/quick-start.rst:24 7f0dd997ca7444229e411413c95b7c46
msgid "Run example" msgid "Run example"
msgstr "运行示例" msgstr "运行示例"
#: ../../source/quick-start.md:16 cf2de2aba8ba459e8bc689880b8bbf4f #: ../../source/quick-start.rst:26 c7c60907c4df409093255742e1d9e74b
msgid "" msgid ""
"After installing PyQt-Fluent-Widgets package using pip, you can run any " "After installing PyQt-Fluent-Widgets package using pip, you can run any "
"demo in the examples directory, for example:" "demo in the examples directory, for example:"
msgstr "" msgstr ""
"使用 pip 安装好 PyQt-Fluent-Widgets 包之后,就可以运行 " "使用 pip 安装好 PyQt-Fluent-Widgets 包之后,就可以运行 "
"[examples](https://github.com/zhiyiYo/PyQt-Fluent-" "`examples <https://github.com/zhiyiYo/PyQt-Fluent-"
"Widgets/tree/master/examples) 目录下的任意示例,比如:" "Widgets/tree/master/examples>`_ 目录下的任意示例,比如:"
#: ../../source/quick-start.rst:34 a9b19524c82b4905a1111e5f9ffb69cb
msgid ""
"If you encounter ``ImportError: cannot import name 'XXX' from "
"'qfluentwidgets'``, it indicates that the package version you installed "
"is too low. You can replace the mirror source with "
"https://pypi.org/simple and reinstall again."
msgstr "如果遇到 `ImportError: cannot import name 'XXX' from 'qfluentwidgets'`,这表明安装的包版本过低。可以按照上面的安装指令将 pypi 源替换为 https://pypi.org/simple 并重新安装."
#~ msgid ""
#~ "If you are using PySide2, PySide6 "
#~ "or PyQt6, you can download the "
#~ "code in PySide2, PySide6 or PyQt6 "
#~ "branch."
#~ msgstr ""
#~ "如果项目中使用的是 PySide2、PySide6 或者 PyQt6,可以在 "
#~ "[PySide2](https://github.com/zhiyiYo/PyQt-Fluent-"
#~ "Widgets/tree/PySide2)、[PySide6](https://github.com/zhiyiYo/PyQt-"
#~ "Fluent-Widgets/tree/PySide6) 和 "
#~ "[PyQt6](https://github.com/zhiyiYo/PyQt-Fluent-"
#~ "Widgets/tree/PyQt6) 分支下载对应的代码。"
Designer
--------
In Qt Designer, there are two ways to use PyQt-Fluent-Widgets.
Promoting widget
^^^^^^^^^^^^^^^^
Right click on a widget, select the ``Promote to ...`` of context menu.
Promoting a widget indicates that it should be replaced with the specified subclass, in our case the ``qfluentwidgets.PushButton``.
.. image:: ./_static/promote_context.jpg
:target: ./_static/promote_context.jpg
:alt:
You will be presented with a dialog to specify the custom widget class the placeholder widget will become.
The header file is the name of the Python module used to import the class, which is ``qfluentwidgets``. Specify ``PushButton`` as the class name of the widget to replace it with.
.. image:: ./_static/promote_dialog.jpg
:target: ./_static/promote_dialog.jpg
:alt:
Well, the widget is now promoted to fluent push button. But you won't be able to see any changes within Qt Designer. Save the window as ``mainwindow.ui`` and compile it to python code, you will see that the ``PushButton`` is imported from ``qfluentwidgets`` package.
Using plugin
^^^^^^^^^^^^
1. create a virtual environment, ``conda`` is the recommended way.
2. Activate virtual environment and run the following code in shell:
.. code-block:: sh
pip install PyQt-Fluent-Widget
pip install pyqt5-tools
3. Download the full code from `PyQt-Fluent-Widgets Repo <https://github.com/zhiyiYo/PyQt-Fluent-Widgets>`_.
4. Run ``python ./tools/designer.py`` to launch Qt Designer (You must use this way to launch Qt Designer).
If everything goes smoothly, you will see all PyQt-Fluent-Widgets components in the sidebar of Qt Designer.
If the startup fails or the components of PyQt-Fluent-Widgets cannot be seen, the solution can be found in `#196 <https://github.com/zhiyiYo/PyQt-Fluent-Widgets/issues/196>`_.
.. image:: ./_static/Designer_plugin.jpg
:target: ./_static/Designer_plugin.jpg
:alt:
The plugin for PySide6 is unstable and may not start QtDesigner successfully. It is recommended to use QtDesigner of PyQt5/6 to generate ui files.
.. note:: PyQt5 must upgrade PyQt5-Frameless-Window to 0.2.7 in order to use the plugin, while PySide6 and PyQt6 do not need to upgrading to frameless packages. PySide2 does not support plugins, but you can use PyQt5's QtDesigner to generate ui files and then compile them into py files using uic.
## Quick start
### Install
To install lite version (`AcrylicLabel` is not available) use pip:
```shell
pip install PyQt-Fluent-Widgets
```
Or install full-featured version use pip:
```shell
pip install "PyQt-Fluent-Widgets[full]"
```
If you are using PySide2, PySide6 or PyQt6, you can download the code in [PySide2](https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PySide2), [PySide6](https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PySide6) or [PyQt6](https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PyQt6) branch.
### Run example
After installing PyQt-Fluent-Widgets package using pip, you can run any demo in the examples directory, for example:
```python
cd examples/gallery
python demo.py
```
\ No newline at end of file
Quick start
-----------
Install
~~~~~~~
To install lite version (``AcrylicLabel`` is not available) use pip:
.. code:: shell
pip install PyQt-Fluent-Widgets -i https://pypi.org/simple/
Or install full-featured version use pip:
.. code:: shell
pip install "PyQt-Fluent-Widgets[full]" -i https://pypi.org/simple/
If you are using PySide2, PySide6 or PyQt6, you can download the code in `PySide2 <https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PySide2>`__, `PySide6 <https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PySide6>`__ or `PyQt6 <https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/PyQt6>`__ branch.
.. warning:: Don't install PyQt-Fluent-Widgets, PyQt6-Fluent-Widgets, PySide2-Fluent-Widgets and PySide6-Fluent-Widgets at the same time, because their package names are all ``qfluentwidgets``.
Run example
~~~~~~~~~~~
After installing PyQt-Fluent-Widgets package using pip, you can run any
demo in the examples directory, for example:
.. code:: python
cd examples/gallery
python demo.py
.. note:: If you encounter ``ImportError: cannot import name 'XXX' from 'qfluentwidgets'``, it indicates that the package version you installed is too low. You can replace the mirror source with https://pypi.org/simple and reinstall again.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册