当前位置:网站首页>Interface switching based on pyqt5 toolbar button -1
Interface switching based on pyqt5 toolbar button -1
2022-07-02 23:24:00 【Crazy Bean Bun】
Pyqt5 yes Python A visual super easy-to-use library , Next, let's take a look at how to realize the toolbar button switching interface .
1. This article uses Qt Designer Tools , How to add this tool , I won't go into details here , Students who don't understand can search by themselves . First, open the interface ,“ New form ” choice "Main Window", Click Create , The interface is as follows , Of course, you can also adjust the attributes , I won't go into details here .


2. stay MainWindow Under the form , Right click , You can add toolbars .


3. Click in the action editor on the right “ New action ”, stay “ Text ” Internal input “ Open the interface 1” , Same operation , stay “ Text ” Internal input “ Open the interface 2”, In this way, the action editor will generate action_1 and action_2.
4. In the action editor , Left click to select action_1, Move to the toolbar , Release the left button , Open the interface 1 It will be automatically added to the toolbar , The same action operation opens the interface 2.

5. Left click to select “Widget”, Move to the main interface , Automatic addition , Set the color to yellow , Is the interface 1. The same action operation interface 2, Set the color to blue .


Save this form here as mainwindow.ui, The next chapter introduces the code implementation . Don't go away , Continue often .
边栏推荐
- 简述中台的常识
- Loss function~
- Win11启用粘滞键关闭不了怎么办?粘滞键取消了但不管用怎么解决
- Sword finger offer II 099 Sum of minimum paths - double hundred code
- Where is the win11 microphone test? Win11 method of testing microphone
- Go basic anonymous variable
- "A good programmer is worth five ordinary programmers!"
- FOC矢量控制及BLDC控制中的端电压、相电压、线电压等概念别还傻傻分不清楚
- Pandora IOT development board learning (HAL Library) - Experiment 4 serial port communication experiment (learning notes)
- Submit code process
猜你喜欢
随机推荐
Redis expiration policy +conf record
Golang common settings - modify background
Cryptography -- the mode of block cipher
海思调用接口之Makefile配置
Use the scroll bar of souI when using the real window in souI
Application of containerization technology in embedded field
20220527_ Database process_ Statement retention
The difference between new and make in golang
2016. maximum difference between incremental elements
数字图像处理实验目录
Detailed explanation and application of merging and sorting
Print out mode of go
How difficult is it to be high? AI rolls into the mathematics circle, and the accuracy rate of advanced mathematics examination is 81%!
[npuctf2020]ezlogin XPath injection
Set right click to select vs code to open the file
详解Promise使用
Submit code process
Brief introduction of emotional dialogue recognition and generation
SQL进阶语法
Win11如何开启目视控制?Win11开启目视控制的方法









