#
#-------------------------------------------------
-QT += core gui network sql
+QT += core gui network sql xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
entry(c);
}
else if(b[0]=="back"){
- if(way.size()>2){
+ if(way.size()>=2){
way.removeLast();
getButtons(way.takeLast());
}
return m_DownloadedData;
}
void MainWindow::readButtons(const QByteArray &in){
+ qDebug()<<"readButtons";
int a=in.count('\n');
QString d=in.split('\n').at(0);
conf->setValue(QString("firstline"), d);
qDebug()<<"q->exec() : "<<q->exec()<<" lastError()="<<q->lastError();
};
- /*bool ok = xml.parse(*in);
- if (!ok)qDebug() << "Parsing failed.\n";*/
db.commit();
flush();
+
+ /*QDomDocument a("buttons");
+ if (!a.setContent(in)){
+ qDebug()<<"a.setcontent failed";
+ return;
+ }
+ QDomElement root = a.documentElement();
+ QDomNode n = root.firstChildElement();
+ QList<QString> cmd;
+ while(!n.isNull()) {
+ QDomNode e = n.firstChildElement();
+ if((cmd.size()<1)&&(n.isText()))e.toText().nodeValue();
+ qDebug()<<"n.nodeName()="<<n.nodeName()<<" n.nodevalue="<<n.nodeValue();
+ while(!e.isNull()){
+ qDebug()<<"e.nodeName = "<<e.nodeName()<<" e.nodevalue="<<e.nodeValue();
+ e.nextSiblingElement();
+
+ }
+ n.nextSiblingElement();
+ }*/
+
+
emit datafilled();
}
void MainWindow::datasent(){
#include <QMainWindow>
//#include <QtGui> don't work since 5.1 (or 5.2)
#include <QtNetwork/QtNetwork>
-
+//#include <QtXml/QDomDocument>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>