首页 > 其他 > 详细

QLineEdit 使用方法

时间:2015-06-19 07:49:39      阅读:275      评论:0      收藏:0      [点我收藏+]

 

在Qt中,QLineEdit是文本编辑框控件,是比较基础且常用的控件的之一,下面是其的一些基本操作。

比如:

禁用或启用该控件

// lineedit is the object name of QLineEdit
ui->lineedit.setDisabled(false);
ui->lineedit.setDisabled(true);

 

设置内容或者返回内容:

ui->lineedit.setText("hello");
QString s = ui->lineedit.text();

 

将控件设为只读模式:

ui->lineedit.setReadOnly(true);

 

QLineEdit 使用方法

原文:http://www.cnblogs.com/grandyang/p/4587537.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!