UI需求,搭建開發環境,基於 pycharm + Python3.7.0+PyQt5 。
網上資料眾多,深一腳淺一腳過來,多言無益,來吧。
一、武器的准備
1、安裝PyQt5:pip install PyQt5
2、安裝QtDesigner:
入坑過程:pip install PyQt5-tools ( Could not find a version that satisfies the requirement pyqt5-tools ) -- God.
出坑:安裝:qt-opensource-windows-x86-msvc -- 終於有了 Designer.exe.
二、配置
1、Pycharm添加QtDesigner,為了生成.ui(Qt界面)文件。
Program:指向上述designer.exe的路徑
Work directory:使用變量 $FileDir$
2、Pycharm添加PyUIC,將生成的.ui文件轉成.py文件。
Arguments的值:-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py
OK。開始創建UI吧!
---------------------
作者:可樂佳斌
來源:CSDN
原文:https://blog.csdn.net/weixin_41946423/article/details/81236078
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!