SModel *m =qobject_cast<SModel*>(model());// main.cpp:61
как исправить эту ошибку
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I. -I. -o main.o main.cpp
In file included from /usr/include/qt4/QtSql/qsqlrelationaltablemodel.h:45:0,
from /usr/include/qt4/QtSql/qsqlrelationaldelegate.h:50,
from /usr/include/qt4/QtSql/QtSql:5,
from main.cpp:2:
/usr/include/qt4/QtSql/qsqltablemodel.h: In instantiation of ‘void QSqlTableModel::qt_check_for_QOBJECT_macro(const T&) const [with T = SModel]’:
/usr/include/qt4/QtCore/qobject.h:378:5: required from ‘T qobject_cast(QObject*) [with T = SModel*]’
main.cpp:61:59: required from here
/usr/include/qt4/QtSql/qsqltablemodel.h:61:5: error: void value not ignored as it ought to be
make: *** [main.o] Ошибка 1