当前位置:网站首页>PySide2

PySide2

2022-04-23 14:07:00 Fresh strawberries

One 、PySide2 What is it? ?

Qt Is a powerful graphical user interface construction tool , Now it's right Python Provide friendly interface support , Namely PyQt and PySide.PyQt Adopt commercial and commercial products that need to purchase copyright GPL The license , and PySide Adopt... Without purchasing copyright LGPL The license .PySide And PyQt Very compatible API, Therefore, there is no need for copyright PySide More suitable for Python Lovers of learning .PySide2 Support Qt5 frame , compatible Python2.7 The above version and Python3.5 Above version .

Two 、 Use steps

1. Software development environment

  • window 10
  • Python 3.8
  • PySide2

2. install PySide2

About Python Please learn by yourself , I don't want to talk about it here .
install PySide2 Of PyPI, Command line :

pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.11/latest/ pyside2 --trusted-host download.qt.io

3. View installation results

pip freeze

4. utilize Pycharm Set up the integrated development environment

stay PyCharm Customize three tools for development .

  • QtDesigner
  • uic
  • rcc

QtDesigner: For rapid design 、 modify ui And generate .ui file .
UIC: What will be made .ui File to .py file
RCC: Resource file .rcc File conversion to .py file

4.1 Customize QtDesigner

  • Program Fill in :PySide2 Under installation path \Scripts\pyside2-designer.exe
  • Arguments: No need to fill in
  • Working directory Fill in : Project path $ProjectFileDir$

 Please add a picture description

4.2 Customize Pyside2-uic

Program Fill in :Python Installation directory : Scripts\pyside2-uic.exe
Arguments Fill in $FileName$ -o $FileNameWithoutExtension$.py
Working directory Fill in $FileDir$
 Please add a picture description

4.3 Customize Pyside2-rcc

Program Fill in :Python Installation directory : Scripts\pyside2-rcc.exe
Arguments Fill in $FileName$ -o $FileNameWithoutExtension$_rc.py
Working directory Fill in $FileDir$
 Please add a picture description


版权声明
本文为[Fresh strawberries]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231400483527.html