QT常用控件学习
2017-05-05 17:13
302 查看
初学QT,从几个常用的控件开始,边学习边补充吧。
控件(control widget)
头文件
QLabel
控件(control widget)
头文件
#include<QApplication> #include<QLabel> #include<QLineEdit> #include<QPushButton> #include<QComboBox> #include<QCheckBox> #include<QRadioButton> #include<QTextEdit> #include<QTextBrowser> //read only TextEdit #include<QGroupBox> #include<QSlider> #include<QSpinBox> #include<QDateEdit> #include<QTimeEdit> #include<QDateTimeEdit> #include<QCompleter> #include<QHBoxLayout> #include<QVBoxLayout> #include<QDebug> #include<QPixmap> #include<QLCDNumber>
QLabel
/*---QLabel---*/ QLabel *label; lay->addWidget(new QLabel("<h1><font color=red>label</font></h1>")); lay->addWidget(label=new QLabel("<a href=www.baidu.com>baidu</a>")); label->setPixmap(QPixmap("../1.jpg")); connect(label,QLabel::linkActivated,[](QString str){ qDebug()<<str; }); /*---------------*/
相关文章推荐
- QT学习笔记11常用控件
- QT学习之表格控件
- Qt学习重要知识点简记---控件使用篇(持续更新)
- ASP.NET实练第一练[学习.NET常用控件与XML数据的处理]
- QT 常用控件的使用
- 黑马程序员之 ASP.NET学习笔记:GridView控件的常用属性及方法
- 2009-04-09技术学习:wicket常用控件使用方法
- Windows8应用开发学习(三)常用控件
- 屏幕方向与常用控件【WP7学习札记之六】
- Qt控件常用操作
- android常用控件学习之TextView和EditView
- Coolite Toolkit学习笔记八:常用控件TabPanel
- Qt学习——控件Widgets
- Qt学习——控件Widgets
- Android学习第12课—常用控件(二)
- QT学习之表格控件的更多细节
- Android开发学习笔记-4 Activity-3 常用控件
- Android学习笔记(三)——常用控件的学习
- 常用控件的学习
- 控件、UI 半年学习总结下自定义控件用法和一些常用页面效果