Тут изучаю Qt, вот пишу прогу для себя. Не получается соединить 2 объекта через слоты\сигналы.
field logic();
MainWindow view(10);
QObject::connect(&view, SIGNAL(SendPosion(int,int)), &logic, SLOT(slotButtonClicked(int,int)));
QObject::connect(&logic, SIGNAL(SetGamer(int)), &view, SLOT(slotSetGamer(int)));
QObject::connect(&logic, SIGNAL(SetIcon(int,int,int)), &view, SLOT(slotSetIcon(int,int,int)));
В обоих классах есть необходимые слоты и сигналы и Q_OBJECT для moc тоже везде прописан. Ругается так:
/home/ddr/test/2/main.cpp:11: error: no matching function for call to ‘QObject::connect(MainWindow*, const char*, field (*)(), const char*)’
/usr/include/qt4/QtCore/qobject.h:202: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType)
/usr/include/qt4/QtCore/qobject.h:307: note: bool QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const
Для еще 2 следующих коннектов аналогично (1 ошибка и 2 нотиса).
Не могу понять почему. Заранее благодарю за ответ, прошу сильно не бить.