QT LCDNumber使用
新建一个QT工程
然后在cpp文件中写入代码
#include "hello.h" #include <qthread.h> #include <QVariant> #include <qstring.h> Hello::Hello(QWidget *parent) : QDialog(parent) { ui.setupUi(this); ui.slider->setRange(0,1000); connect(ui.slider,SIGNAL(valueChanged(int)),ui.lcd,SLOT(display(int))); } Hello::~Hello() { }
拉动滑块就可以改变lcdnumber中的数值。
posted on 2013-11-07 16:58 lovezj9012 阅读(2301) 评论(0) 编辑 收藏 举报