当前位置:网站首页>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 .
边栏推荐
- Alibaba cloud award winning experience: how to use polardb-x
- Solving ordinary differential equations with MATLAB
- BBR 遭遇 CUBIC
- [hardware] origin of standard resistance value
- ServletContext learning diary 1
- Win11启用粘滞键关闭不了怎么办?粘滞键取消了但不管用怎么解决
- psnr,ssim,rmse三个指标的定量分析
- 用matlab调用vs2015来编译vs工程
- Tronapi wave field interface - source code without encryption - can be opened twice - interface document attached - packaging based on thinkphp5 - detailed guidance of the author - July 1, 2022 08:43:
- Value sequence < detailed explanation of daily question >
猜你喜欢

采用VNC Viewer方式遠程連接樹莓派

Mask R-CNN

The use of 8255 interface chip and ADC0809

Win11自动关机设置在哪?Win11设置自动关机的两种方法

FOC矢量控制及BLDC控制中的端电压、相电压、线电压等概念别还傻傻分不清楚

RecyclerView结合ViewBinding的使用

解决:exceptiole ‘xxxxx.QRTZ_LOCKS‘ doesn‘t exist以及mysql的my.cnf文件追加lower_case_table_names后启动报错

golang入门:for...range修改切片中元素的值的另类方法

程序员版本的八荣八耻~

抖音实战~点赞数量弹框
随机推荐
基于Pyqt5工具栏按钮可实现界面切换-2
Innovation strength is recognized again! Tencent security MSS was the pioneer of cloud native security guard in 2022
Cryptographic technology -- key and ssl/tls
为什么RTOS系统要使用MPU?
[npuctf2020]ezlogin XPath injection
从底层结构开始学习FPGA----Xilinx ROM IP的定制与测试
Talk about memory model and memory order
基于FPGA的VGA协议实现
golang入门:for...range修改切片中元素的值的另类方法
What if win11 can't turn off the sticky key? The sticky key is cancelled but it doesn't work. How to solve it
采用VNC Viewer方式遠程連接樹莓派
QT qpprogressbar details
SharedPreferences 保存List<Bean> 到本地并解决com.google.gson.internal.LinkedTreeMap cannot be cast to异常
Warning: implicitly declaring library function 'printf' with type 'int (const char *,...)‘
购买完域名之后能干什么事儿?
Alibaba cloud award winning experience: how to use polardb-x
深度剖析数据在内存中的存储----C语言篇
内网渗透 | 手把手教你如何进行内网渗透
程序员版本的八荣八耻~
Simple square wave generating circuit [51 single chip microcomputer and 8253a]