MistaPain
30th October 2006, 15:35
Hi,
I've been trying to use a QSpinBox in my project. I would like to use the signal "valueChanged(int i)" (as described in the documentation), but at runtime QObject::connect complains that there is no such signal ;-(
I thought that something with my code was wrong. But even the following small application is suffering the same problem:
#include <QtGui>
#include <QApplication>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QSpinBox sB;
QObject::connect(
&sB, SIGNAL(valueChanged(int i)),
&app, SLOT(quit())
);
sB.show();
return app.exec();
}
http://img114.imageshack.us/img114/4158/blubcs8.png
I'm using QT 4.2.0 for Windows and MingW.
Can anyone spot the point where my mistake is? I'm really getting mad about this.
I've been trying to use a QSpinBox in my project. I would like to use the signal "valueChanged(int i)" (as described in the documentation), but at runtime QObject::connect complains that there is no such signal ;-(
I thought that something with my code was wrong. But even the following small application is suffering the same problem:
#include <QtGui>
#include <QApplication>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QSpinBox sB;
QObject::connect(
&sB, SIGNAL(valueChanged(int i)),
&app, SLOT(quit())
);
sB.show();
return app.exec();
}
http://img114.imageshack.us/img114/4158/blubcs8.png
I'm using QT 4.2.0 for Windows and MingW.
Can anyone spot the point where my mistake is? I'm really getting mad about this.