开发者

Using Qt QWebPage in a Windows QtService

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 c开发者_Python百科omplains 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


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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜