在 Windows QtService 中使用 Qt QWebPage
我正在使用 QtService 编写网页缩略图渲染服务。是否有可能包含足够的 Gui 库来让 QtWebKit 满意而不会遇到交互服务的限制?
我什至不确定 websnap 示例的作用是什么,让 QWebPage 保持满意(是否只是因为它与 Gui 库链接?)
我对 Qt 库非常陌生,所以对于有更多经验的人来说,答案可能是显而易见的。
谢谢, 安迪
I am using QtService to write a web page thumbnail rendering service. Is it possible to include sufficient of the Gui libraries to keep QtWebKit happy without running into the restriction on interactive services?
I have the websnap sample from websnap.cpp and this somehow convinces the QWebPage component that a Gui is available without actually displaying the widget. When I try to duplicate the environment in the service it complains that there in no gui for the widget.
I strongly suspect that QtService and QWebPage are fundamentally incompatible but have not yet given up hope that there is a workaround.
I am not even sure what it is that the websnap sample does that keeps QWebPage happy (is it just because its linked with the Gui library?)
I am very new to the Qt library so the answer may be obvious to someone with more experience.
Thanks,
Andy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尽管 QtWebKit 可以在无头环境中工作(没有任何可见的小部件),但它仍然需要图形库等存在并起作用。否则,它将如何计算字体规格、渲染文本等等?因此,你总是需要 QtGui。
PS:我写了 websnap 示例:)
Althought QtWebKit can work in headless environment (without any visible widgets), it still requires graphics libraries etc to be present and functional. Otherwise, how would it compute font metrics, render the text, and so on? Thus, you always need QtGui.
PS: I wrote the websnap example :)