[Qt-interest] domModel newbie pointer problem
Alexander Poddey
alexander.poddey at gmx.net
Sat Sep 19 14:26:57 CEST 2009
HI all,
I made som tests with the domModel and domItem example code.
I have however sometroouble using the code in my application (which might be
due to my limited experience with c++):
I pass a
DomItem * diOut;
DomModel * dm; //points to an initialized DomModel
into a method.
bool aclass::test(DomModel * dm, DomItem * diOut)
In there, I call e.g.
diOut=dm->root(); //DomItem * DomModel::root() returns the root Item
inside the method,
diOut->node().nodeName(); then e.g. gives the correct name (#document)
diOut->node().nodeType(); then e.g. gives the correct type
(QDomNode::DocumentNode)
but after return,
diOut->node().nodeName(); is empty
diOut->node().nodeType(); is 21=QDomNode::BaseNode
Whats wrong here?
thx
alex
More information about the Qt-interest-old
mailing list