Build A PyQt Application by PyCharm

来源:互联网 发布:华为网络产品线部门 编辑:程序博客网 时间:2024/05/02 23:07

A typical structure of a PyQt applications is as follows,


APP -- src (main.py, ...)

         |- ui (mainwindow.py, *.ui, ...)

         |- rc (*.qrc, icons, images, ...)


Note:

PyCharm 4.5 support python 3 and PyQt 5

.qrc files have to managed by hand as xml files. Otherwise they can be generated by Qt Creator. They are compiled in the folowing way

pyrcc5 app.qrc -o app_rc.py

*.ui files can be generated by Qt Designer and be compiled by pyuic5 and then Ui_*.py can be imported and called by other python code

pyuic5 logindialog.ui -o ui_logindialog.py

For PySide applications, above tools are pyside-uic and pyside-rcc, respectively.


A very good tutorial about PyQt is here

http://pythonthusiast.pythonblogs.com/230_pythonthusiast/categories/426_qt_pyqt_and_pyside_tutorial.html


BTW, to keep a Desktop link of Pycharm, and call its shortcut by Win key,

I suggest install Pycharm with sudo account

0 0
原创粉丝点击