Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

Py-Qt-MVC

> 编程语言
Open source

Python Model-View-Controller application generator for automating creation of PyQt and PySide applications.

99 stars0 likes0 views
WebsiteGitHub

About

Python Model-View-Controller application generator for automating creation of PyQt and PySide applications.

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 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

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