当前位置:网站首页>使用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边栏推荐
- Sentinel-流量防卫兵
- MySQL之知识点(六)
- ThoughtWorks global CTO: build the architecture according to needs, and excessive engineering will only "waste people and money"
- WR | Jufeng group of West Lake University revealed the impact of microplastics pollution on the flora and denitrification function of constructed wetlands
- flask解决CORS ERR 问题
- Ordinary programmers look at the code, and top programmers look at the trend
- ternary operator
- Abnormal recovery of virtual machine Oracle -- Xi Fenfei
- Server configuration jupyter environment
- CMake教程Step4(安装和测试)
猜你喜欢

To solve the problem of "double click PDF file, pop up", please install Evernote program

Kafaka technology lesson 1

IDC报告:腾讯云数据库稳居关系型数据库市场TOP 2!

Use of ThinkPHP template

提高應用程序性能的7個DevOps實踐

ternary operator
Redis+caffeine two-level cache enables smooth access speed

Beijing internal promotion | the machine learning group of Microsoft Research Asia recruits full-time researchers in nlp/ speech synthesis and other directions

Design of electronic clock based on 51 single chip microcomputer

33: Chapter 3: develop pass service: 16: use redis to cache user information; (to reduce the pressure on the database)
随机推荐
MySQL之知识点(七)
Seven Devops practices to improve application performance
33: Chapter 3: develop pass service: 16: use redis to cache user information; (to reduce the pressure on the database)
Cartoon: how to multiply large integers? (I) revised version
goto Statement
Judge whether a number is a prime number (prime number)
域名解析,反向域名解析nbtstat
提高应用程序性能的7个DevOps实践
About JSON parsing function JSON in MySQL_ EXTRACT
Mongodb (quick start) (I)
thinkphp3.2.3
这个17岁的黑客天才,破解了第一代iPhone!
Zhang Ping'an: accélérer l'innovation numérique dans le cloud et construire conjointement un écosystème industriel intelligent
漫画:寻找无序数组的第k大元素(修订版)
2022年信息系统管理工程师考试大纲
Webapp development - Google official tutorial
CMake教程Step4(安装和测试)
First day of learning C language
关于mysql中的json解析函数JSON_EXTRACT
机器学习01:绪论