还有,编译出来的单独运行也分别要10多mb内存和虚拟内存
#include <QApplication>
#include <QSpinBox>
#include <QSlider>
#include <QHBoxLayout>
int main(int argc,char**argv)
{
QApplication app(argc,argv);
QWidget *window=new QWidget;
window->setWindowTitle("How old are you?");
QSpinBox * spinbox = new QSpinBox;
QSlider * slider = new QSlider(Qt::Horizontal);
spinbox->setRange(0,130);
slider->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(14);
QHBoxLayout *layout=new QHBoxLayout;
layout->addWidget(spinbox);
layout->addWidget(slider);
window->setLayout(layout);
window->show();
return app.exec();}
就是这个例子编出来的