[Qt-interest] Does a root QDomNode have a parent?

Lingfa Yang lingfa at brandeis.edu
Mon Jul 20 17:37:32 CEST 2009


A quick question:

Ask parent of a root node, I thought it should return NULL, but actually not NULL. So I ask what is the name of this parent node. It returns “#document”.

if (!root.parentNode().isNull()) {
	QString name = root.parentNode().nodeName(); // “#document” ???
}

Does it sounds right?

Thanks,
Lingfa




More information about the Qt-interest-old mailing list