[webkit-qt] QtRuntimeObject problem
tomsheep.cn at gmail.com
Thu Sep 8 20:17:53 PDT 2011
I am using QtWebkit in my product, and yesterday I got a strange problem.
There are two QObjects I want to injcect, named "A" and "B", and A is the
parent of B.
QObject *A = ...
QObject *B = ...
QWebFrame *frame = ... // the target frame
And in Inject slot:
QString js("A.B.foo = 'bar';");
Then the strange thing happens, I can access A.B.foo successfully at first
time, but if I do some other operations, for example,
invoke the web inspector or close another window in my app(which has no
business with current window), then the A.B.foo is gone! But A.B is still
and all INVOKABLE methods and properties are still accessible.
I am not sure whether it is a bug, the Qt version is 4.7.3.
- Kang Liu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-qt