PDA

View Full Version : Accessing complete QWebFrame document tree, not just elements



TimShnaider
27th March 2012, 08:45
I don’t know the thinking that went into the design of the QtWebKit interface, but not being able to do the following really limits its usefulness:


Can’t access nodes, only elements
Can’t (easily) get the QWebFrame for an iframe/frame element


I need to traverse the DOM tree and access everything, which means I need access to underlying WebCore classes.
A few posts exist on accessing WebCore from a Qt project, but they don’t work on my 4.8.0/MSVC2010 system as I get unresolved external symbol errors on linking. Linking against JSCore.lib results in duplicate symbol errors.

Anyone got a proven method for doing this? I’m not a C++ man so hit the limits on figuring out what to do.
At the moment I’m adding additional methods to QWebPage and compiled up my own QtWebKit.dll to do what I need, but would prefer not too. Don't mind distributing these changes so using LGPL.

Thanks for any assistance, I really like Qt otherwise (coming from a .NET man)

Mr.Andrew
2nd November 2012, 03:37
I have same problem. Does anybody know how to find QWebFrame related to <IFRAME> QWebElement ?