Запускается /home/stas/www/www...
QMetaObject::connectSlotsByName: No matching signal for on_tabWidget_currentChanged(QWidget*)
QFile::open: File (BDwww.xml) already open
Error open file
/home/stas/www/www завершился с кодом 0
Хотя файл открываю вроде правильно
// Запись в xml фаил
void MainWindow::addCategoryInXML()
{
QDomDocument doc;
QFile file("BDwww.xml");
doc.setContent(&file);
QDomElement root,categoryNum,categoryName;
QDomText categoryNameText;
if(file.open(QIODevice::WriteOnly | QIODevice::Text))
{
root=doc.documentElement();// получаем корень документа
categoryNum=doc.createElement("category");//создаем потомка
categoryName=doc.createElement("name_category");
categoryNameText = doc.createTextNode("Errare humanum est");
root.appendChild(categoryNum);
categoryNum.appendChild(categoryName);
categoryName.appendChild(categoryNameText);
QTextStream out(&file);
doc.save(out,4);
file.close();
}
else qDebug()<<"Error open file";
}