No project description provided
Project description
uiml
一个使用特殊的xml格式,用于绘制PySide6的ui界面介绍
uiml是一个用于绘制PySide6的ui界面的工具,它使用特殊的xml格式来定义界面的布局,样式和信号。uiml的语法非常简单,易于学习和使用。你可以使用uiml来创建复杂的界面,而不需要编写大量的代码。
uiml的语法在xml的基础上,增加支持的python对象,所以它既有xml的轻便性,又有python对象的灵活性。
安装
要使用uiml,你需要先安装它。你可以使用pip来安装uiml:
pip install uiml
使用
要使用uiml,你需要创建一个uiml文件,并在其中定义界面的布局,样式和信号。以下是一个简单的示例:
<layout name="central_layout" direction="v">
<QLabel name="text" arg=["This is a label"] />
<layout name="bottom_layout" direction="h" stretch="true">
<QPushButton name="ok_button" arg=["Close the window"] style="selected" signals={"clicked": self.close} />
</layout>
</layout>
属性
layout
这是布局对象,可以在子项添加布局对象,或者添加控件对象。 参数:
- name:布局对象的名称,用于在代码中引用。
- direction:布局的方向,可以是“v”(垂直)或“h”(水平),可以自己扩展。
- stretch:布局对象的拉伸因子,可以是“true”或“false”。
Widget
这是组件对象,对象的tag名是控件的名称,例如“QLabel”、“QPushButton”等。 参数:
- name:控件对象的名称,用于在代码中引用。 = arg:控件对象的参数,使用列表存储,可以是字符串、列表、字典等。
- kwarg:控件对象的属性,带有关键字,使用字典存储,可以是字符串、列表、字典等。
- style:控件对象的样式,可以是字符串、列表、字典等。
- signals:控件对象的信号,使用字典存储,键是信号名称,值是信号处理函数。
- init_steps:控件对象的初始化步骤,使用列表存储,子项使用字典。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uiml-0.1.0.tar.gz.
File metadata
- Download URL: uiml-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05e134153e1dd71e323de2586f601334955d5ece7ca34b22969c19308cc7c329
|
|
| MD5 |
04a8789b3992de0a2d779eb7822e74e5
|
|
| BLAKE2b-256 |
cc2875c0dfa87021f0768747dda3c532241b7ea34ddc13d130e6323dbdf31be3
|
File details
Details for the file uiml-0.1.0-py3-none-any.whl.
File metadata
- Download URL: uiml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7e258b937d2a515579a27c137400e6807d5a217c2602ce06478b02256790f31
|
|
| MD5 |
e7575d829f1aec79d1069436a1398cf5
|
|
| BLAKE2b-256 |
e964ecfcd2ead1ae0147ffafdf36ee00f162ab1013b4463a512f32ca87923dc5
|