基于Qt 4.5.1
我将使用 QWebPluginFactory 创建的 QWidget 放入 HTML 页面中。
...
...
TestObject 工作得很好,也可以与它进行 JS 通信。但我发现了两个问题:
- 我无法在 QWidget 之上绘制任何 HTML 元素(绝对定位和设置 z 索引)。有没有办法在WebKit中设置渲染顺序?或者让 z-index 工作?改变宽度、高度和其他属性就可以了。
- 当我隐藏 testObj 的父 div (display:none) 并再次显示它 (display:block) 时,再次调用 WebPluginFactory 并销毁原始对象。 (目前我的解决方法是将 TestObj 的大小调整为 1 * 1 像素,这样用户就看不到它)。
有谁知道这到底是如何工作的? 4.6 中修复了这个问题吗?
谢谢
Based on Qt 4.5.1
I placed QWidget, created with QWebPluginFactory, into HTML page.
...
...
TestObject works just fine, also JS communication with it. But i found two problems:
- I cant draw no HTML elements above QWidget(positioning absolute and setting z-indexes). Is there any way how to set rendering order in WebKit? Or to make z-index work ? Changing width, height and other properties works just fine.
- When i hide parent div for testObj (display:none) and show it again(display:block), WebPluginFactory is called again and original object is destroyed. (Currently my workaround is to resize TestObj to 1 * 1 pixels, so user doesnot sees it).
Does anybody knows how this works exactly? Is something of this fixed in 4.6 ?
Thanks
发布评论
评论(1)
我在 4.7 版本中遇到了类似的问题。看起来它还没有修复:检查 此处
I was having similar issues with 4.7 release. It looks like it is still not fixed just yet: check here