Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Python to develop Custom Interface

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to use Python to develop a customized interface, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.

1 prepare SD card above 8G, 16G is better.

During the compilation process, a lot of storage space is consumed. Be sure to run sudo raspi-config before compiling and select the partition of the expand file system extension SD card.

If there is not enough space, it will cause the operation to hang. Use df-h to view the available capacity of the storage card.

2 update the index list of resources

Sudo apt-get update (download index lists from the service) sudo apt-get upgrade (compare index lists, update dependencies)

3 install python-dev

Sudo apt-get install python-dev

Otherwise, when compiling SIP, it will prompt fatal error: Python.h: No such file or directory

4 install libqt4-dev

Sudo apt-get install libqt4-dev# or sudo apt-get install qt4-dev-tools

Otherwise, Error:Make sure you have a working Qt qmake on your PATH or use the-q argument to explicitly specify a working Qt qmake 5 will be prompted when compiling PyQt.

Install SIP and PyQt in turn.

Install SIP:

Wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.6/sip-4.16.6.tar.gztar vxf sip-4.16.6.tar.gzcd sip-4.16.6python configure.pymakemake install

Install PyQt4:

# wget http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10/PyQt-x11-gpl-4.10.tar.gzwget http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10.4/PyQt-x11-gpl-4.10.4.tar.gz/downloadcp download PyQt-x11-gpl-4.10.4.tar.gz tar vxf PyQt-x11-gpl-4.10.4tar.gzcd PyQt-xll-gpl-4.10.4python configure.pymakemake install

5 run the source code of Python&GUI

Go to the Examples directory under PyQT and run it using python * .py.

The following picture is the result of two days over the weekend, although it is very crude, but the moment of success, it is all worth it:).

Thank you for reading this article carefully. I hope the article "how to use Python to develop a customized interface" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report