当前位置:网站首页>使用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边栏推荐
- Kafaka technology lesson 1
- CMake教程Step3(添加库的使用要求)
- Summary of optimization scheme for implementing delay queue based on redis
- Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
- Judge whether a string is a full letter sentence
- 一文了解MySQL事务隔离级别
- Judge whether a number is a prime number (prime number)
- Alpha conversion from gamma space to linner space under URP (II) -- multi alpha map superposition
- 哈趣K1和哈趣H1哪个性价比更高?谁更值得入手?
- Short the command line via jar manifest or via a classpath file and rerun
猜你喜欢

7 pratiques devops pour améliorer la performance des applications

机器学习01:绪论

C # mixed graphics and text, written to the database in binary mode

Three traversal methods of binary tree

云主机oracle异常恢复----惜分飞

ICML 2022 | Meta提出鲁棒的多目标贝叶斯优化方法,有效应对输入噪声

7. Scala class

Kafaka technology lesson 1

Server configuration jupyter environment

stirring! 2022 open atom global open source summit registration is hot!
随机推荐
Which is more cost-effective, haqu K1 or haqu H1? Who is more worth starting with?
WR | Jufeng group of West Lake University revealed the impact of microplastics pollution on the flora and denitrification function of constructed wetlands
漏洞复现----48、Airflow dag中的命令注入(CVE-2020-11978)
This 17-year-old hacker genius cracked the first generation iPhone!
URP下Alpha从Gamma空间到Linner空间转换(二)——多Alpha贴图叠加
WebApp开发-Google官方教程
flask解决CORS ERR 问题
域名解析,反向域名解析nbtstat
Mysql5.6 parsing JSON strings (supporting complex nested formats)
云主机oracle异常恢复----惜分飞
独立开发,不失为程序员的一条出路
mysql中取出json字段的小技巧
Cmake tutorial step6 (add custom commands and generate files)
Cloud security daily 220705: the red hat PHP interpreter has found a vulnerability of executing arbitrary code, which needs to be upgraded as soon as possible
Zhang Ping'an: accelerate cloud digital innovation and jointly build an industrial smart ecosystem
Force deduction solution summary 729- my schedule I
Design of electronic clock based on 51 single chip microcomputer
Knowledge points of MySQL (7)
MySql 查询符合条件的最新数据行
解读:如何应对物联网目前面临的安全问题?