QGUI - 0.1MB超轻量Python GUI框架,用模板来快捷制作深度学习模型推理界面

Related tags

GUI Development QGUI
Overview

QGUI

Downloads GitHub forks GitHub Repo stars GitHub
QGUI - 低于100k的超轻量桌面图形化框架,可通过几行代码、使用模板来快捷制作出属于你的图形化界面

EAP - Easy access program

当前版本为概念版本,如有需求或建议可在issue中提出。

相关案例

项目名 项目描述 GUI源码
油画带师 基于飞桨PaddlePaddle的风格迁移工具,可将图片、视频转化为油画风格,支持GPU转换 GUI源码
QWebsite 为GitHub浏览与Clone提供加速能力,且非科学上网 GUI源码
人像扣图 基于PaddleHub的人像扣图小工具 GUI源码
完整案例 QGUI的全部基础组件组成的案例 GUI源码

快速上手

安装QGUI

  • 通用方式 python -m pip install qgui

  • 国内推荐 python -m pip install qgui -i https://mirrors.bfsu.edu.cn/pypi/web/simple

  • 运行Demo/安装测试 python -m qgui

代码示例/模板

简单示例

from qgui import CreateQGUI
from qgui.banner_tools import BaseBarTool, GitHub
from qgui.notebook_tools import ChooseFileTextButton, RunButton


def click(args):
    print("你点到我啦~")
    print("输入框文字为:", args["文件选择"].get())


# 创建主界面
main_gui = CreateQGUI(title="一个新应用")

# 在界面最上方添加一个按钮,链接到GitHub主页
main_gui.add_banner_tool(GitHub("https://github.com/QPT-Family/QGUI"))
# 要不试试自定义Banner按钮?
main_gui.add_banner_tool(BaseBarTool(click, name="一个新组件"))
# 在主界面部分添加一个文件选择工具吧~
main_gui.add_notebook_tool(ChooseFileTextButton(name="文件选择"))
# 要不要再添加一个运行按钮?,绑定刚刚创建的函数吧~
main_gui.add_notebook_tool(RunButton(click))
# 简单加个简介
main_gui.set_navigation_about(author="GT",
                              version="0.0.1",
                              github_url="https://github.com/QPT-Family/QGUI",
                              other_info=["欢迎加入QPT!"])
# 跑起来~
main_gui.run()

组件文档

目前组件还在逐步完善,随后就提供目录啦,可以先康一下完整案例

进阶教程和完整组件文档暂时还没有,先委屈一下看看源码吧~
上方Banner工具
左侧Navigation工具:main_gui.set_navigation_about() and main_gui.set_navigation_info()
中央Notebook工具

版本规划

  • 9月完成 V1.0预览版 - 提供常规GUI组件以及Callback
  • 10月完成 V1.0正式版 - 完善预览版,提供窗口拓展组件
  • 11月完成 V1.1 - 优化GUI排版,增加皮肤
  • 12月完成 V1.2 - 适配更多深度学习输入格式
  • 2022 - 支持远程模式
Comments
  • 【bug】使用pyinstaller打包后再执行报错

    【bug】使用pyinstaller打包后再执行报错

    [Errno 2] No such file or directory: 'xxxxx\ttkbootstrap\themes.json' [15164] Failed to execute script 'gui' due to unhandled exception!

    Traceback (most recent call last): File "gui.py", line 484, in File "qgui\factory.py", line 50, in init File "ttkbootstrap_init_.py", line 80, in init File "ttkbootstrap_init_.py", line 100, in _load_themes File "importlib\resources.py", line 169, in read_text File "importlib\resources.py", line 125, in open_text File "PyInstaller\loader\pyimod02_importers.py", line 539, in open_resource File "pathlib.py", line 1208, in open File "pathlib.py", line 1063, in _opener

    opened by ellieot 2
  • TypeError: __new__() got an unexpected keyword argument 'themes_file'

    TypeError: __new__() got an unexpected keyword argument 'themes_file'

    Traceback (most recent call last): File "e:\music_tools\sep_gui\gui.py", line 12, in main_gui = CreateQGUI(title="一个新应用") File "C:\software\miniconda3\envs\music\lib\site-packages\qgui-0.5-py3.7.egg\qgui\factory.py", line 52, in init self.root.style = Style(**QStyle.default) TypeError: new() got an unexpected keyword argument 'themes_file'

    opened by Freddd13 2
  • modify 人像抠图,set_navigation_info, title, info必须明确给值

    modify 人像抠图,set_navigation_info, title, info必须明确给值

    set_navigation_info必须指明给title、info的值 def set_navigation_info(self, title: str, info: str): """ 设置左侧导航栏其他信息 :param title: 标题 :param info: 信息 """

    opened by livingbody 1
  • 跑readme的demo,提示未获取默认主题

    跑readme的demo,提示未获取默认主题

    如题:跑readme的demo,提示未获取默认主题

    `C:\Users\livingbody\miniconda3\envs\p2\python.exe C:/Users/livingbody/PycharmProjects/qguitest/main.py Traceback (most recent call last): File "C:/Users/livingbody/PycharmProjects/qguitest/main.py", line 20, in main_gui = CreateQGUI(title="一个新应用") File "f:\qgui\qgui\factory.py", line 52, in init self.root.style = Style(**QStyle.default) File "C:\Users\livingbody\miniconda3\envs\p2\lib\site-packages\ttkbootstrap_init_.py", line 81, in init self.load_themes(themes_file) File "C:\Users\livingbody\miniconda3\envs\p2\lib\site-packages\ttkbootstrap_init.py", line 119, in _load_themes themetype=settings['type'], TypeError: list indices must be integers or slices, not str

    Process finished with exit code 1 `

    opened by livingbody 1
  • Add CodeQL workflow for GitHub code scanning

    Add CodeQL workflow for GitHub code scanning

    Hi QPT-Family/QGUI!

    This is a one-off automatically generated pull request from LGTM.com :robot:. You might have heard that we’ve integrated LGTM’s underlying CodeQL analysis engine natively into GitHub. The result is GitHub code scanning!

    With LGTM fully integrated into code scanning, we are focused on improving CodeQL within the native GitHub code scanning experience. In order to take advantage of current and future improvements to our analysis capabilities, we suggest you enable code scanning on your repository. Please take a look at our blog post for more information.

    This pull request enables code scanning by adding an auto-generated codeql.yml workflow file for GitHub Actions to your repository — take a look! We tested it before opening this pull request, so all should be working :heavy_check_mark:. In fact, you might already have seen some alerts appear on this pull request!

    Where needed and if possible, we’ve adjusted the configuration to the needs of your particular repository. But of course, you should feel free to tweak it further! Check this page for detailed documentation.

    Questions? Check out the FAQ below!

    FAQ

    Click here to expand the FAQ section

    How often will the code scanning analysis run?

    By default, code scanning will trigger a scan with the CodeQL engine on the following events:

    • On every pull request — to flag up potential security problems for you to investigate before merging a PR.
    • On every push to your default branch and other protected branches — this keeps the analysis results on your repository’s Security tab up to date.
    • Once a week at a fixed time — to make sure you benefit from the latest updated security analysis even when no code was committed or PRs were opened.

    What will this cost?

    Nothing! The CodeQL engine will run inside GitHub Actions, making use of your unlimited free compute minutes for public repositories.

    What types of problems does CodeQL find?

    The CodeQL engine that powers GitHub code scanning is the exact same engine that powers LGTM.com. The exact set of rules has been tweaked slightly, but you should see almost exactly the same types of alerts as you were used to on LGTM.com: we’ve enabled the security-and-quality query suite for you.

    How do I upgrade my CodeQL engine?

    No need! New versions of the CodeQL analysis are constantly deployed on GitHub.com; your repository will automatically benefit from the most recently released version.

    The analysis doesn’t seem to be working

    If you get an error in GitHub Actions that indicates that CodeQL wasn’t able to analyze your code, please follow the instructions here to debug the analysis.

    How do I disable LGTM.com?

    If you have LGTM’s automatic pull request analysis enabled, then you can follow these steps to disable the LGTM pull request analysis. You don’t actually need to remove your repository from LGTM.com; it will automatically be removed in the next few months as part of the deprecation of LGTM.com (more info here).

    Which source code hosting platforms does code scanning support?

    GitHub code scanning is deeply integrated within GitHub itself. If you’d like to scan source code that is hosted elsewhere, we suggest that you create a mirror of that code on GitHub.

    How do I know this PR is legitimate?

    This PR is filed by the official LGTM.com GitHub App, in line with the deprecation timeline that was announced on the official GitHub Blog. The proposed GitHub Action workflow uses the official open source GitHub CodeQL Action. If you have any other questions or concerns, please join the discussion here in the official GitHub community!

    I have another question / how do I get in touch?

    Please join the discussion here to ask further questions and send us suggestions!

    opened by lgtm-com[bot] 0
Owner
QPT Family
QPT软件包家族 - 在这里不仅有QPT核心框架和其生态组件,还欢迎开发者贡献的优质开箱即用开源项目
QPT Family