当前位置:网站首页>使用QT设计师界面类创建2个界面,通过按键从界面1切换到界面2
使用QT设计师界面类创建2个界面,通过按键从界面1切换到界面2
2022-07-05 17:14:00 【雪无香】
思路:按钮点击函数hide窗口1同时emit广播点击信号(自己加),main使用connect,窗口1发出点击信号,运行窗口2show显示函数
步骤一:Add new——QT——设计师界面类
步骤二:窗口一
signals:
void Show_EnterBtn();//登录按钮被点击信号
private slots:
void on_EnterBtn_clicked();//登录按钮相应函数:关闭登录界面,广播登录按钮点击信号
void Enter::on_EnterBtn_clicked()
{
this->hide();//隐藏窗口1
emit Show_EnterBtn();//广播按钮点击信号
}
步骤三:窗口二
private slots:
void Show_FuncSelect();//显示窗口2步骤四:main函数
QObject::connect(&mEnter,SIGNAL(Show_EnterBtn()),&mFuncSelect,SLOT(Show_FuncSelect()));//点击按钮,关闭窗口1,显示窗口2边栏推荐
- Error in compiling libssh2. OpenSSL cannot be found
- CMake教程Step3(添加库的使用要求)
- Which is more cost-effective, haqu K1 or haqu H1? Who is more worth starting with?
- SQL删除重复数据的实例教程
- 【二叉树】根到叶路径上的不足节点
- Kafaka technology lesson 1
- C (WinForm) the current thread is not in a single threaded unit, so ActiveX controls cannot be instantiated
- Redis+caffeine two-level cache enables smooth access speed
- Ant financial's sudden wealth has not yet begun, but the myth of zoom continues!
- How to save the trained neural network model (pytorch version)
猜你喜欢

Server configuration jupyter environment

WR | Jufeng group of West Lake University revealed the impact of microplastics pollution on the flora and denitrification function of constructed wetlands

Three traversal methods of binary tree

漏洞复现----48、Airflow dag中的命令注入(CVE-2020-11978)

Winedt common shortcut key modify shortcut key latex compile button

基于51单片机的电子时钟设计

33:第三章:开发通行证服务:16:使用Redis缓存用户信息;(以减轻数据库的压力)
一文了解MySQL事务隔离级别

To solve the problem of "double click PDF file, pop up", please install Evernote program
MySql 查询符合条件的最新数据行
随机推荐
Cartoon: how to multiply large integers? (I) revised version
关于mysql中的json解析函数JSON_EXTRACT
stirring! 2022 open atom global open source summit registration is hot!
IDC报告:腾讯云数据库稳居关系型数据库市场TOP 2!
C # realizes crystal report binding data and printing 3-qr code barcode
This 17-year-old hacker genius cracked the first generation iPhone!
漫画:如何实现大整数相乘?(上) 修订版
统计php程序运行时间及设置PHP最长运行时间
菜刀,蚁剑,冰蝎,哥斯拉的流量特征
[7.7 live broadcast preview] the lecturer of "typical architecture of SaaS cloud native applications" teaches you to easily build cloud native SaaS applications. Once the problem is solved, Huawei's s
提高應用程序性能的7個DevOps實踐
ThoughtWorks global CTO: build the architecture according to needs, and excessive engineering will only "waste people and money"
忽米沄析:工业互联网标识解析与企业信息系统的融合应用
Check the WiFi password connected to your computer
漫画:如何实现大整数相乘?(整合版)
In depth understanding of redis memory obsolescence strategy
Flask solves the problem of CORS err
Compter le temps d'exécution du programme PHP et définir le temps d'exécution maximum de PHP
独立开发,不失为程序员的一条出路
ternary operator