当前位置:网站首页>[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 ");边栏推荐
- 在消费互联网时代,诞生了为数不多的头部平台的话
- Data Lake (XII): integration of spark3.1.2 and iceberg0.12.1
- KT148A语音芯片ic的用户端自己更换语音的方法,上位机
- AcWing 340. Solution to communication line problem (binary + double ended queue BFS for the shortest circuit)
- Self-Improvement! Daliangshan boys all award Zhibo! Thank you for your paper
- CS5268完美代替AG9321MCQ Typec多合一扩展坞方案
- AcWing 181. Turnaround game solution (search ida* search)
- Cuckoo filter
- B端电商-订单逆向流程
- at编译环境搭建-win
猜你喜欢

HDL design peripheral tools to reduce errors and help you take off!

Kt148a voice chip instructions, hardware, protocols, common problems, and reference codes
[译]深入了解现代web浏览器(一)

Implementation of online shopping mall system based on SSM

c语言链表--待补充

攻防世界pwn题:Recho

Summary of interview experience, escort your offer, full of knowledge points

AcWing 340. Solution to communication line problem (binary + double ended queue BFS for the shortest circuit)

Data Lake (XII): integration of spark3.1.2 and iceberg0.12.1

After 65 days of closure and control of the epidemic, my home office experience sharing | community essay solicitation
随机推荐
[real case] trap of program design - beware of large data
Kt148a voice chip IC user end self replacement voice method, upper computer
从20s优化到500ms,我用了这三招
Postman下载安装
JS how to get integer
Start practicing calligraphy
Summary of interview experience, escort your offer, full of knowledge points
Self-Improvement! Daliangshan boys all award Zhibo! Thank you for your paper
【JS】获取hash模式下URL的搜索参数
通信人的经典语录,第一条就扎心了……
[JS] get the search parameters of URL in hash mode
MySQL function
AcWing 1129. Heat wave solution (shortest path SPFA)
【Kubernetes系列】kubeadm reset初始化前后空间、内存使用情况对比
After eight years of test experience and interview with 28K company, hematemesis sorted out high-frequency interview questions and answers
B端电商-订单逆向流程
面试经验总结,为你的offer保驾护航,满满的知识点
Educational codeforces round 129 (rated for Div. 2) supplementary problem solution
勵志!大凉山小夥全獎直博!論文致謝看哭網友
使用IDM下载百度网盘的文件(亲测有用)[通俗易懂]