当前位置:网站首页>[QT] QPushButton creation
[QT] QPushButton creation
2022-07-02 20:00:00 【Gentleman · forever】
Catalog
Two 、 Code application and running results
One 、 Function interpretation
1、 Create button
The header file :#include <QPushButton>
QPushButton * btn = new QPushButton;
btn->show();// Pop up the window by ejecting
Two 、 Code application and running results
// Create a button
QPushButton * btn = new QPushButton;
btn->show();// Pop up the window by ejecting
// Give Way btn Depending on widget Window
btn->setParent(this);
// Show text
btn->setText(" The first button ");
// Create a second button Create a window according to the size of the control
QPushButton * btn2 = new QPushButton(" The second button ", this);
// Move btn2
btn2->move(100,100);
// Set up btn2 Size
btn2->resize(50,50);
// Reset window size
resize(600,400);
// Set fixed window size
setFixedSize(600,400);
// Set the title of the window
setWindowTitle(" Hi hi harm ");
边栏推荐
- What are the benefits of multi terminal applet development? Covering Baidu applet, Tiktok applet, wechat applet development, and seizing the multi platform traffic dividend
- [译]深入了解现代web浏览器(一)
- R language uses econcharts package to create microeconomic or macroeconomic maps, and indifference function to visualize indifference curve
- NMF-matlab
- CheckListBox control usage summary
- Conscience summary! Jupyter notebook from Xiaobai to master, the nanny tutorial is coming!
- How to set priorities in C language? Elaborate on C language priorities
- B端电商-订单逆向流程
- rxjs Observable 自定义 Operator 的开发技巧
- [ERP software] what are the dangers of the secondary development of ERP system?
猜你喜欢
接口测试到底怎么做?看完这篇文章就能清晰明了
Istio1.12:安装和快速入门
良心总结!Jupyter Notebook 从小白到高手,保姆教程来了!
Refactoring: improving the design of existing code (Part 2)
蓝牙芯片ble是什么,以及该如何选型,后续技术发展的路径是什么
c语言链表--待补充
Burp install license key not recognized
450 Shenxin Mianjing 1
AcWing 340. Solution to communication line problem (binary + double ended queue BFS for the shortest circuit)
B-end e-commerce - reverse order process
随机推荐
Yes, that's it!
ShardingSphere-JDBC5.1.2版本关于SELECT LAST_INSERT_ID()本人发现还是存在路由问题
Spark source code compilation, cluster deployment and SBT development environment integration in idea
Automated video production
How to set priorities in C language? Elaborate on C language priorities
upload-labs
Why do I have a passion for process?
AcWing 1127. Sweet butter solution (shortest path SPFA)
JASMINER X4 1U深度拆解,揭开高效省电背后的秘密
API文档工具knife4j使用详解
GCC: Graph Contrastive Coding for Graph Neural NetworkPre-Training
多端小程序开发有什么好处?覆盖百度小程序抖音小程序微信小程序开发,抢占多平台流量红利
使用IDM下载百度网盘的文件(亲测有用)[通俗易懂]
Istio1.12: installation and quick start
pytorch 模型保存的完整例子+pytorch 模型保存只保存可訓練參數嗎?是(+解决方案)
Istio1.12:安装和快速入门
After eight years of test experience and interview with 28K company, hematemesis sorted out high-frequency interview questions and answers
KT148A语音芯片ic的开发常见问题以及描述
Share several map bed websites for everyone to share pictures
Taiwan SSS Xinchuang sss1700 replaces cmmedia cm6533 24bit 96KHz USB audio codec chip