新建一个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()
{

}
View Code

相关文章:

  • 2022-12-23
  • 2021-12-21
  • 2021-08-02
  • 2021-12-14
  • 2022-01-07
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-26
  • 2021-08-17
  • 2021-05-16
  • 2021-10-02
  • 2022-12-23
  • 2021-05-28
相关资源
相似解决方案