跳转到主要内容

用Python创建Qt表单对话框和控件的最简单方式

项目描述

https://raw.githubusercontent.com/PierreRaybaut/formlayout/master/doc/images/advanced1.png https://raw.githubusercontent.com/PierreRaybaut/formlayout/master/doc/images/advanced2.png https://raw.githubusercontent.com/PierreRaybaut/formlayout/master/doc/images/advanced3.png
使用formlayout,生成表单非常简单
  • 要显示对话框,只需调用fedit函数。

  • 要设置表单对话框,只需使用列表传递参数(字段名称、默认值等)。

  • 要将formlayout嵌入到自己的库中,只需复制formlayout自洽单脚本(无依赖性,除了Qt本身)。

以下是一个简单示例(更多示例包含在源代码包中)

from formlayout import fedit
datalist = [('Name', 'Paul'),
            (None, None),
            (None, 'Information:'),
            ('Age', 30),
            ('Sex', [0, 'Male', 'Female']),
            ('Size', 12.1),
            ('Eyes', 'green'),
            ('Married', True),
            ]
fedit(datalist, title="Describe yourself", comment="This is just an <b>example</b>.")

这显示了以下对话框

https://raw.githubusercontent.com/PierreRaybaut/formlayout/master/doc/images/simple.png

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码分布

formlayout-1.2.0.tar.gz (79.6 kB 查看哈希值)

上传于 来源

构建版本

formlayout-1.2.0-py2.py3-none-any.whl (13.7 kB 查看哈希值)

上传于 Python 2 Python 3

由以下支持

AWSAWS云计算和安全赞助商DatadogDatadog监控FastlyFastlyCDNGoogleGoogle下载分析MicrosoftMicrosoftPSF赞助商PingdomPingdom监控SentrySentry错误日志StatusPageStatusPage状态页面