I am trying to use moc with the following header.
#ifndef LCDRANGE_H
#define LCDRANGE_H
#include <QObject>
#include <QWidget>
class QSlider;
class LCDRange : public QWidget
{
Q_OBJECT
public:
LCDRange(QWidget *parent = 0);
int value() const;
public slots:
void setValue(int value);
signals:
void valueChanged(int newValue);
private:
QSlider *slider;
};
#endif
I get the following in the command line. I am not sure what it means, did it fail or succeed? Am I supposed to do something with the code that shows up?
C:\Qt\4.5.0-vc\qt\bin>moc.exe "C:\Documents and Settings\David\Mis documentos\Vi
sual Studio 2008\Projects\Qt Project\Qt Project\lcdrange.h"
/****************************************************************************
** Meta object code from reading C++ file 'lcdrange.h'
**
** Created: Wed 28. Oct 06:25:11 2009
** by: The Qt Meta Object Compiler version 61 (Qt 4.5.3)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "C:\Documents and Settings\David\Mis documentos\Visual Studio 2008\Proj
ects\Qt Project\Qt Project\lcdrange.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'lcdrange.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 61
#error "This file was generated using the moc from 4.5.3. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_LCDRange[] = {
// content:
2, // revision
0, // classname
0, 0, // classinfo
2, 12, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
// signals: signature, parameters, type, tag, flags
19, 10, 9, 9, 0x05,
// slots: signature, parameters, type, tag, flags
43, 37, 9, 9, 0x0a,
0 // eod
};
static const char qt_meta_stringdata_LCDRange[] = {
"LCDRange\0\0newValue\0valueChanged(int)\0"
"value\0setValue(int)\0"
};
const QMetaObject LCDRange::staticMetaObject = {
{ &QWidget::staticMetaObject, qt_meta_stringdata_LCDRange,
qt_meta_data_LCDRange, 0 }
};
const QMetaObject *LCDRange::metaObject() const
{
return &staticMetaObject
}
void *LCDRange::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_LCDRange))
return static_cast<void*>(const_cast< LCDRange*>(this));
return QWidget::qt_metacast(_clname);
}
int LCDRange::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
case 1: setValue((*reinterpret_cast< int(*)>(_a[1]))); break;
default: ;
}
_id -= 2;
}
return _id;
}
// SIGNAL 0
void LCDRange::valueChanged(int _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
QT_END_MOC_NAMESPACE
I am using windows in case it's relevant.
Thanks.