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 write a four-level linkage demo using Eric6 and pyqt5

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

Share

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

This article mainly introduces how to use Eric6 and pyqt5 to write a four-level linkage demo, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

New project

Select the drop-down box as well as label and buttons, and there is a tableview to display the data. After the design is completed

Click Save, then select compile form to compile into code, then select the form code generator, and select the following function

Every combobox selection is the same function, and only button chooses click

Generate the function with the following files

There is no need to change the generated code to run in UI_scrapy_qt in pycharm. The program logic is in scarpy. Reply to pyqt after following the official account to get the complete code.

Results:

About patterns in tableview

The following modes are available

/ / QStringListModel stores a set of strings

/ / QStandardItemModel stores data with any hierarchical structure

/ / QDirModel encapsulates the file system

/ / QSqlQueryModel encapsulates the query result set of SQL

/ / QSqlTableModel encapsulates the table in SQL

/ / QSqlRelationalTableModel encapsulates SQL table with foreign key

/ / QSortFilterProxyModel executes sort and/or filter to another model

If clicking designer shows no, you need to use pip installation on the command line:

To install the missing PyQt5 tools, you can use the following sources:

Pip install PyQt5-tools-I http://pypi.douban.com/simple-- trusted-host=pypi.douban.com

After the installation is complete, you can find designer.exe in the. / Python/Lib/site-packages/pyqt5-tools directory

Thank you for reading this article carefully. I hope the article "how to write a four-level demo using Eric6 and pyqt5" 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