PyQt6中的QtDesigner在哪里?

7
我找到了bindings/QtDesigner目录,但是那里只有.sip文件。
在pypi的包网站上,它说:

sip-install工具还将从sdist包中安装绑定,但会允许您配置安装的许多方面。

sip-install需要一个名为pyproject.toml的文件,但是只有QtDesigner.toml,如果我只是将它重命名为pyproject.toml,它就无法运行。
sip-install: pyproject.toml: the '[tool.sip.metadata]' section is missing
< p > QtDesigner.toml 的内容如下:

# Automatically generated configuration for PyQt6.QtDesigner.

sip-version = "6.0.1"
sip-abi-version = "13.0"
module-tags = ["Qt_6_0_0", "Qt_6_0_0", "Linux", "Qt_6_0_0", "Qt_6_0_0", "Linux", "Qt_6_0_0", "Qt_6_0_0", "Linux", "Qt_6_0_0", "Qt_6_0_0", "Linux"]
module-disabled-features = ["PyQt_WebChannel", "PyQt_OpenGL_ES2", "PyQt_WebChannel", "PyQt_WebChannel", "PyQt_OpenGL_ES2", "PyQt_WebChannel"]
2个回答

8

首先你需要安装pyqt6-tools

pip install pyqt6-tools

那么你可以使用QtDesigner:

pyqt6-tools designer

如果您运行以下命令,您可以查看所有pyqt6-tools命令:

pyqt6-tools --help

输出:
Usage: pyqt6-tools [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  designer
  installuic
  qmlscene
  qmltestrunner

希望能帮助您。

3
您可以使用PyQt5的设计师来创建PyQt6的界面。您可以使用以下命令将ui文件转换为PyQt6的Python文件:
pyuic6 -x filename.ui -o filename.py

注意:您无需安装pyuic6,它会随PyQt6自动安装。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接