QXmlStreamReader | Documentation not very clear...
Solved
General and Desktop
-
Seems like it should be straight-forward... But I'm not getting it to work. I'm just trying to retrieve some elements from the xml reader and assign the values to UI labels. According to what I read, this should work:
ui->labelName->setText(xmlReader.documentVersion.toString());
However, the best that I've been able to get is:
QXmlStreamReader::documentVersion does not have a class type.
According to the documentation, this class' methods mostly return QStringRef values, and according to the documentation for them, the .toString() function should return a QString type.
What am I missing ?? Seems to me if this was invalid Qt shouldn't be offering a list of options after the documentVersion.
Thanks in advance !
-
Hi! You forgot the parenthesis:
xmlReader.documentVersion().toString()
.