PyQt5学习笔记1-安装PyQt5

时间:2022-04-06 08:33:53

安装非常简单!

1.Raspberry开机连接至互联网

2.安装PyQt5

sudo apt-get install python3-pyqt5

 3.看看PyQt中都哪些模块

 先进入Python交互环境后用help命令查看,可运行IDLE软件或在命令行中输入"Python3"

$ Python3
Python 3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5
>>> help(PyQt5)
#help(PyQt5)命令执行后将切换到新界面,只显示如下说是的内容,按回车键继续显示,按‘q'键退出回到python交互模式
...
PACKAGE CONTENTS Qt QtBluetooth QtCore QtDesigner QtGui QtHelp QtMacExtras QtMultimedia QtMultimediaWidgets QtNetwork QtNfc QtOpenGL QtPrintSupport QtQml QtQuick QtQuickWidgets QtSql QtSvg QtTest QtWebChannel QtWebEngineCore QtWebEngineWidgets QtWebSockets QtWidgets QtXml QtXmlPatterns
...
 
 
>>> dir(PyQt5)

>>> exit()

 

附:主要文档

  • PyQt5参考手册:http://pyqt.sourceforge.net/Docs/PyQt5/introduction.html
  • Qt参考文档:http://doc.qt.io/
  • Qt5参考手册:http://doc.qt.io/qt-5/index.html