报错QT has not been declared
#include<QApplication>
#include<QHBoxLayout>
#include<QSlider>
#include<QSpinBox>
#include<Qt>
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
QWidget *window=new QWidget;
window->setWindowTitle("enter your age");
QSpinBox *spinbox=new QSpinBox;
QSlider *slider=new QSlider(QT::Horizontal); //问下这里要填什么头文件才能用这个QT类啊???
spinbox->setRange(0,130);
spinbox->setRange(0,130);
QObject::connect(spinbox,SIGNAL(valueChanged(int)),slider,SLOT(setValue(int)));
QObject::connect(slider,SIGNAL(valueChanged(int)),spinbox,SLOT(setValue(int)));
spinbox->setValue(35);
QHBoxLayout *layout=new QHBoxLayout;
layout->addWidget(spinbox);
layout->addWidget(slider);
window->setLayout(layout);
window->show();
return app.exec();
}