当前位置:网站首页>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 .
边栏推荐
- Catalogue of digital image processing experiments
- Brief introduction of emotional dialogue recognition and generation
- How does win11 turn on visual control? Win11 method of turning on visual control
- MySQL queries nearby data And sort by distance
- The concepts of terminal voltage, phase voltage and line voltage in FOC vector control and BLDC control are still unclear
- Li Kou brush questions (2022-6-28)
- BBR 遭遇 CUBIC
- Hisilicon VI access video process
- 設置單擊右鍵可以選擇用VS Code打開文件
- 20220527_ Database process_ Statement retention
猜你喜欢
随机推荐
The first batch of Tencent cloud completed the first cloud native security maturity assessment in China
Remote connection of raspberry pie by VNC viewer
2022年最新最全软件测试面试题大全
基于Pyqt5工具栏按钮可实现界面切换-1
简述中台的常识
[favorite poems] OK, song
YOLOX加强特征提取网络Panet分析
Win11如何开启目视控制?Win11开启目视控制的方法
Configuration clic droit pour choisir d'ouvrir le fichier avec vs Code
万物并作,吾以观复|OceanBase 政企行业实践
Start from the bottom structure to learn the customization and testing of FPGA --- Xilinx ROM IP
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:
【STL源码剖析】仿函数(待补充)
Innovation strength is recognized again! Tencent security MSS was the pioneer of cloud native security guard in 2022
golang中new与make的区别
【直播预约】数据库OBCP认证全面升级公开课
Prometheus deployment
Compose 中的 'ViewPager' 详解 | 开发者说·DTalk
Editor Caton
Static file display problem









