void MainWindow::readFile(const QDomNode& node)
{
QDomNode doneNode= node.firstChild();
while(!doneNode.isNull()){
if(!doneNode.isElement())
{
QDomElement domElement=doneNode.toElement();
if(!domElement.isNull())
{
if(domElement.tagName()=="name_category")
{
model->setData(index0, QVariant(domElement.text()), Qt::EditRole);
}
}
}
readFile(doneNode);
}
}
Компилятор
In file included from main.cpp:5:
addfile.h: In member function ‘void MainWindow::readFile(const QDomNode&)’:
addfile.h:36: error: no matching function for call to ‘QStandardItemModel::setData(QModelIndex*&, QVariant, Qt::ItemDataRole)’
../qtsdk-2010.02/qt/include/QtGui/qstandarditemmodel.h:336: note: candidates are: virtual bool QStandardItemModel::setData(const QModelIndex&, const QVariant&, int)
make: *** [main.o] Ошибка 1
make: Выход из каталога `/home/stas/www'
Завершено с кодом 2.
Ошибка во время сборки проекта www
Во время выполнения сборки на этапе 'Make'