安装包
pip install PyQt6 PyQt6-tools
#查看Qt版本
pip show PyQt6
pip show pyqt6-tools
配置扩展工具
QTD(界面设计)
Program:/Users/wan/PycharmProjects/NewDemo/venv/lib/python3.11/site-packages/qt6_applications/Qt/bin/Designer.app
Working directory:$ProjectFileDir$
Pyuic(ui文件转Python代码)
Program:/Users/wan/PycharmProjects/NewDemo/venv/bin/pyuic6
Arguments:$FileName$ -o $FileNameWithoutExtension$.py
Working directory:$ProjectFileDir$
Pyrcc(资源系统转换)
Program:/Users/wan/PycharmProjects/NewDemo/venv/bin/pyuic6
Arguments:$FileName$ -o $FileNameWithoutExtension$.py
Working directory:$ProjectFileDir$
启动
创建成功后保存到项目目录,然后右键选择Pyuic可以生成对应的Python代码