Dragonboard 410c Python interaction design - how to build a PyQt environment

Python is a very easy to use and use language, very suitable for developers to quickly build and implement their own ideal prototype, in development, you can quickly build your own ideas through Python, and later easy to use other higher performance languages Local or global optimization. UI interaction design is a common problem in development. Today I will show you how to use the PyQt library to quickly interact with your own interactive program in the Dragonbaord 410c Linux environment.

In the previous blog, I have already introduced how to build a QT environment and write a QT application in the Dragoboard 410c linux environment, but the process is very complicated, and we need to manually solve various dependency problems and compile during the build process. Install the corresponding library, but today's PyQt QT-based Python language GUI library is very simple, no matter in the construction of the library environment or the writing of the program, it inherits the simple and easy to use Python. We can quickly complete the environment in the Dragonbaord 410c linux environment, and write GUI interactive programs, and also can use Qt design for UI interaction design, and then convert to a modular Python interactive script program, and finally we only Need to focus on how to implement our logic design.

First we have a Dragonboard 410c development board with debian linux installed, connected to the monitor, keyboard, mouse, and then we can start building our PyQt environment.

Specific steps are as follows:

1) With the new debian source

Here we run the following two commands to update the debain source:

Sudo apt-get update -y

Sudo apt-get upgrade -y

Wait for about half an hour (depending on the network) to complete the update.

2) Install the latest Python

Apt-get install python*

Running the above command will install Python3. If you already have Python3 on your board, don't install it.

3) Install PyQT

Sudo apt-get install python3-pyqt5

This step is the key. If the installation is unsuccessful, it is usually yours. 1) This step is not done well. The source is not updated successfully. After the installation is successful, as shown in the figure below.

Well, here you have completed the construction of the Python QT environment on your Dragonboard 410c development board, then you can use the UI interactive library provided by PyQt to complete the development and design on the Dragonboard 410c, here we give A simple UI design test code is as follows:

#!/user/bin/python3
#test.py
Import sys
From PyQt5.QtWidgets import QApplicaTIon, QWidget
If __name__ == '__main__':
App = QApplicaTIon(sys.argv)
w = QWidget()
W.resize(700,500)
W.move(100,100)
w.setWindowTItle('Dragonboard 410c test')
W.show()
Sys.exit(app.exec_())

Running the above code, we can see a simple GUI like this:

Here, you can refer to the PyQt official website for more development introductions. You can also refer to the blog post using eric6 and Pyqt5 for GUI programming. Learn how to use the Qt design interface design tool to build the UI and then convert it into a runnable Python script. Deploy.

Seeing here, everyone is very excited, you can complete your UI interactive program environment and programming on the Dragonboard 410c development board...

Nano Core For Electronic Watt-hour Meter

The resistance DC component magnetic core has strong resistance DC component ability, wide current range, few additional circuits and devices, strong reliability and insensitive to interference.

The performance of resisting DC iron core

The resistance DC composite single magnetic core is a single resistance DC magnetic core, which has the characteristics of high linearity, high precision, easy phase error compensation and good high and low temperature characteristics. At the same time, compared with the composite core, the single core has stronger stability and smaller volume.

The application of best magnetic core

Our excellent magnetic iron core has high permeability,low coercivity and loss,excellent performance on DC immue and temperature stability that can be widely used to the electronic watt-hour meter,resistance DC component transformer and electrical power system measurement.

Anyang Kayo Amorphous Technology Co.,Ltd. , https://www.kayoamotech.com