当前位置:网站首页>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 .
边栏推荐
- The concepts of terminal voltage, phase voltage and line voltage in FOC vector control and BLDC control are still unclear
- Go project operation method
- (毒刺)利用Pystinger Socks4上线不出网主机
- 第三方支付功能测试点【杭州多测师_王sir】【杭州多测师】
- Realize the linkage between bottomnavigationview and navigation
- Hisilicon VI access video process
- 详解Promise使用
- Solving ordinary differential equations with MATLAB
- Getting started with golang: for Range an alternative method of modifying the values of elements in slices
- Configuration clic droit pour choisir d'ouvrir le fichier avec vs Code
猜你喜欢

公司里只有一个测试是什么体验?听听他们怎么说吧
![Eight bit responder [51 single chip microcomputer]](/img/4f/683948fca93a0dc1a0409839f60759.jpg)
Eight bit responder [51 single chip microcomputer]

Win11如何开启目视控制?Win11开启目视控制的方法

Eight honors and eight disgraces of the programmer version~

Remote connection of raspberry pie by VNC viewer

Construction of Hisilicon 3559 universal platform: rotation operation on the captured YUV image
![Simple square wave generating circuit [51 single chip microcomputer and 8253a]](/img/fa/83a5a1ef2d8b95923e6084d6ef1fa2.jpg)
Simple square wave generating circuit [51 single chip microcomputer and 8253a]

Go language sqlx library operation SQLite3 database addition, deletion, modification and query

Is 408 not fragrant? The number of universities taking the 408 examination this year has basically not increased!

LINQ usage collection in C #
随机推荐
Talk about memory model and memory order
Go basic anonymous variable
阿里云有奖体验:如何使用 PolarDB-X
[favorite poems] OK, song
Hisilicon VI access video process
【Proteus仿真】51单片机+LCD12864推箱子游戏
Win11系统explorer频繁卡死无响应的三种解决方法
采用VNC Viewer方式远程连接树莓派
2022年最新最全软件测试面试题大全
Cryptography -- the mode of block cipher
Go basic constant definition and use
Quantitative analysis of PSNR, SSIM and RMSE
C#中Linq用法汇集
Remote connection of raspberry pie by VNC viewer
Pytorch training CPU usage continues to grow (Bug)
Configuration clic droit pour choisir d'ouvrir le fichier avec vs Code
Realize the linkage between bottomnavigationview and navigation
QT qpprogressbar details
基于FPGA的VGA协议实现
Loss function~