[Qt-interest] "DOM Changed" Signal

Thomas J. Webb magusofthedark at yahoo.com
Mon Mar 9 23:08:13 CET 2009


Hello,

I used to be on this mailing list a long time ago, but left due to high volume. But now I'm back! The release of 4.5 lGPL made me sooo happy and now I'm adding new features to my QT apps (my license expired back during 3.4, so I have a lot of new QT features to catch up to).

Anyway, I didn't see anything in the documentation, but I was wondering if there was a signal I could use to notify object that a QDom or derived class was changed. If not, I could subclass the relevant XML classes like this:

QDomElementDerivedClass::setAttribute(const QString & name, const QString & value) {
     emit dom_changed();
     QDomElement::setAttribute(name, value);
}

but was hoping there was already something there that I just failed to find in the documentation. Would it be considered good practice to do this (does this add too much memory overhead)? I'm thinking that, for example, in a web browser, when the DOM is changed by the Javascript, the page is re-rendered where appropriate. I have a similar situation where things must change when the xml changes (it's not web-related, not that that has to do with anything) and I must keep the DOM in memory (so the changes can be saved, etc.)

-thanks,
Thomas



      



More information about the Qt-interest-old mailing list