hi
this is my code:
QSTRING text;
QDOM DOCUMENT DOC("myfile.xml")
qdomelement ELEMENT = DOC.DocumentElement();
for(QDomNode n = element.firstChild();!n.isNull(); n = n.nextSibling())
{
if(n= "PLCNO")
{
QDomText t = n.toText();
if (!t.isNull())
text = t.data();
plcno->text = text
}
if(n= "PLCName")
{
QDomText t = n.toText();
if (!t.isNull())
text = t.data();
plcname->text = text //(Converting string to text)
}
}
here i want to print the text(string value) in the Lineeditcontrol(plcno and plcname),
[plcno->text = text]
is this correct way to print the text from string? or ui->plcno->text()=text
if(n= "PLCName")
is this correct way to check the condition?
Bookmarks