百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

Py-Qt-MVC

> 编程语言
开源

Python 是一个 Model-View-Controller 应用程序生成器,用于自动创建 PyQt 和 PySide 应用程序。

99 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Python 是一个 Model-View-Controller 应用程序生成器,用于自动创建 PyQt 和 PySide 应用程序。

Py-Qt-MVC

Script for auto-generating Model-View-Controller application template files for PyQt or PySide.

Manually creating model, view, controller, and application Python files can be tedious, repetitive, and error prone when dealing with a large number of widgets. This script auto-generates templates of these files based on an input file containing a list of widgets names. It generates code for the following classes:

  • View class
    • imports and builds UI code auto-generated by pyuic4 or pyside-uic
    • getter/setter style properties for the value each widget
    • getter/setter style properties for the enabled state value of each widget
    • setModel functions for widget types compatible with Qt models
    • widget signal connections
    • signal event functions
    • a function to update widget values upon announced changes to the model data
  • Controller class
    • signal event functions
  • Model class
    • getter/setter style properties for the value of each Qt model
    • ConfigParser section and options variables
    • creation of Qt models for compatible widget types
    • variable name placeholders
    • functions for subscribing to and announcing changes to the model data
  • Application class
    • instantiation of model, view, and controller classes

See also this Stack Overflow post: http://stackoverflow.com/a/26699122/1470749

Usage

py_qt_mvc.py widget_names.txt

where widget_names.txt is a text file containing a widget name on each line, and each widget name starts with the widget type, e.g. pushButton_my_button.

Example

Given a text file containing the widget name of comboBox_test, the following code would be generated:

…

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言