有没有办法使用JSON模式自动创建PYQT表单?

发布于 2025-02-11 11:06:10 字数 436 浏览 0 评论 0原文

我正在使用GUI(pyqt6),其中用户加载了一些文件并为每个文件添加元数据。因此,对于每个文件,我想拥有一个窗口(qdialog),该窗口本质上是带有字段的表单,该字段由json架构指定。

我是pyqt的新手本质上看起来像一个表格。但是,我想使用存储在json文件中的架构自动化此步骤(考虑任何示例json架构)。

是否已经有一个Python库,我对此绝对很明显? 您将如何进行编码?谢谢!

I am working on a GUI (PyQt6) where the user loads some files and adds metadata for each. So for each file, I would like to have a window (QDialog) which is essentially a form with fields which are specified by a json schema.

I am new to PyQt and I can code the mechanism to open a form (QDialog with QLabels and QLineEdit which essentially looks like a form. see image). However, I would like to automatize this step using the schema that's stored in a json file (consider any example json schema).

Is there already a python library for this and I'm absolutely obvious about it?
How would you go about coding this? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文