#include "number.h"

int main(int argc, char **argv)
{
	Number a, b;
	a.setValue(13);

    //QObject::connect(&a, SIGNAL(valueChanged(int,int)), &a, SLOT(printValue()));
    //QObject::connect(&a, SIGNAL(valueChanged(int,int)), &b, SLOT(setValue(int)));
    //QObject::connect(&b, SIGNAL(valueChanged(int,int)), &b, SLOT(printValue()));

    QObject::connect(&a, &Number::valueChanged, &a, &Number::printValue);
    QObject::connect(&a, &Number::valueChanged, &b, &Number::setValue);
    QObject::connect(&b, &Number::valueChanged, &b, &Number::printValue);

	a.setValue(15);

	return 0;
}
