当前位置:网站首页>[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 ");
边栏推荐
- 编写完10万行代码,我发了篇长文吐槽Rust
- AcWing 181. Turnaround game solution (search ida* search)
- Development skills of rxjs observable custom operator
- Implementation of 453 ATOI function
- 【Hot100】23. 合并K个升序链表
- 【NLP】一文详解生成式文本摘要经典论文Pointer-Generator
- 高并发下如何避免产生重复数据?
- SBT tutorial
- How to set priorities in C language? Elaborate on C language priorities
- 分享几个图床网址,便于大家分享图片
猜你喜欢
Design and implementation of ks004 based on SSH address book system
KT148A语音芯片ic的软件参考代码C语言,一线串口
Automatically generate VGg image annotation file
KT148A语音芯片使用说明、硬件、以及协议、以及常见问题,和参考代码
How to avoid duplicate data in gaobingfa?
rxjs Observable 自定义 Operator 的开发技巧
Introduction to mongodb chapter 03 basic concepts of mongodb
Educational codeforces round 129 (rated for Div. 2) supplementary problem solution
勵志!大凉山小夥全獎直博!論文致謝看哭網友
良心总结!Jupyter Notebook 从小白到高手,保姆教程来了!
随机推荐
HDL design peripheral tools to reduce errors and help you take off!
Self-Improvement! Daliangshan boys all award Zhibo! Thank you for your paper
Development skills of rxjs observable custom operator
Google Earth engine (GEE) - Landsat 9 image full band image download (Beijing as an example)
Introduction to mongodb chapter 03 basic concepts of mongodb
MySQL function
Spark source code compilation, cluster deployment and SBT development environment integration in idea
AcWing 903. Expensive bride price solution (the shortest path - building map, Dijkstra)
Automated video production
Kt148a voice chip IC software reference code c language, first-line serial port
PXE installation "recommended collection"
Educational codeforces round 129 (rated for Div. 2) supplementary problem solution
【每日一题】241. 为运算表达式设计优先级
After writing 100000 lines of code, I sent a long article roast rust
Automatic reading of simple books
GCC: Graph Contrastive Coding for Graph Neural NetworkPre-Training
Detailed explanation of VBScript (I)
checklistbox控件用法总结
Postman接口测试实战,这5个问题你一定要知道
How to set priorities in C language? Elaborate on C language priorities