【PyQt5】QT designer + eclipse 集成開發


【寫在前面的話】

  考慮將pyqt5的界面開發qt designer 集成在eclipse中,並且,不利用cmd命令行進行轉換。

 

【工具】

  1、pyqt5

  2、qt designer

  3、eclipse +pydy

【步驟】

  1、首先配置Qt designer。 菜單 run-->external Tools-->External tools configurations

  2、在Program 中new 一個新項目

  3、配置PyUIC,如圖2所示:

 

 

  ******但是這里有個問題,最后轉換的py文件,名字是 *.ui.py      這個是錯誤的,之后有時間了會改正這個命令,估計是javap命令。

  4、配置QTdesigner,如圖3所示;

  

  5、最后能夠很順利的編譯成功。

  主要是,運用額外工具來編寫界面的時候,不是在eclipse內部集成,而是跳出另外的窗口進行編輯,然后保存文件,之后會形成  .ui 文件,然后在利用pyuic工具來進行 .ui 文件轉換成 .py 文件。

 

【附錄】

  在這里附上argument 中的一些參數。便於以后的學習。

            Arguments                       Location
${workspace_loc}                            c:\eclipse\workspace
${workspace_loc:/MyProject1/MyFile.txt}          c:\eclipse\workspace\MyProject\MyFile.txt
${workspace_loc:/MyProject2/MyFile.txt}          c:\projects\MyProject2\MyFile.txt
${project_loc}                             c:\projects\MyProject2
${project_loc:/MyProject1/MyFile.txt}             c:\eclipse\workspace\MyProject
${container_loc}                            c:\projects\MyProject2\MyFolder
${resource_loc}                             c:\projects\MyProject2\MyFile.txt
${project_path}                             /MyProject2
${container_path}                           /MyProject2/MyFolder
${resource_path}                           /MyProject2/MyFolder/MyFile.txt
${project_name}                            MyProject2
${container_name}                           MyFolder
${resource_name}                           MyFile.txt
${build_type}                             none

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM