当前位置:网站首页>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 .
边栏推荐
- 购买完域名之后能干什么事儿?
- 在SOUI里使用真窗口时使用SOUI的滚动条
- SQL advanced syntax
- Quantitative analysis of PSNR, SSIM and RMSE
- Cryptography -- the mode of block cipher
- Win11启用粘滞键关闭不了怎么办?粘滞键取消了但不管用怎么解决
- VIM interval deletion note
- “一个优秀程序员可抵五个普通程序员!”
- 潘多拉 IOT 开发板学习(HAL 库)—— 实验4 串口通讯实验(学习笔记)
- Construction of Hisilicon 3559 universal platform: rotation operation on the captured YUV image
猜你喜欢
潘多拉 IOT 开发板学习(HAL 库)—— 实验4 串口通讯实验(学习笔记)
Jinglianwen technology's low price strategy helps AI enterprises reduce model training costs
China Academy of information technology, Tsinghua University, Tencent security, cloud native security, industry university research and use strong alliance!
Win11麦克风测试在哪里?Win11测试麦克风的方法
深度剖析数据在内存中的存储----C语言篇
ADC of stm32
[adjustment] postgraduate enrollment of Northeast Petroleum University in 2022 (including adjustment)
(毒刺)利用Pystinger Socks4上线不出网主机
CDN 加速,需要域名先备案
Remote connection of raspberry pie by VNC viewer
随机推荐
Solution: exceptiole 'xxxxx QRTZ_ Locks' doesn't exist and MySQL's my CNF file append lower_ case_ table_ Error message after names startup
Where is the win11 microphone test? Win11 method of testing microphone
Compose 中的 'ViewPager' 详解 | 开发者说·DTalk
[proteus simulation] 51 MCU +lcd12864 push box game
Value sequence < detailed explanation of daily question >
C# MVC创建一个视图摆脱布局的影响
Doorplate making C language
MySQL queries nearby data And sort by distance
20220527_ Database process_ Statement retention
C#中Linq用法汇集
[Yangcheng cup 2020] easyphp
Construction of Hisilicon 3559 universal platform: rotation operation on the captured YUV image
設置單擊右鍵可以選擇用VS Code打開文件
Go basic constant definition and use
The difference between new and make in golang
潘多拉 IOT 开发板学习(HAL 库)—— 实验3 按键输入实验(学习笔记)
Three solutions to frequent sticking and no response of explorer in win11 system
万物并作,吾以观复|OceanBase 政企行业实践
[adjustment] postgraduate enrollment of Northeast Petroleum University in 2022 (including adjustment)
Mask R-CNN