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 阅读(2337) 评论(0) 收藏 举报
 
                    
                 
 
                
            
         
 浙公网安备 33010602011771号
浙公网安备 33010602011771号