简体   繁体   English

pygtk的跨平台html小部件

[英]cross-platform html widget for pygtk

I'm trying to write a small gui app in pygtk which needs an html-rendering widget. 我正在尝试在pygtk中编写一个小的gui应用程序,该应用程序需要一个html渲染小部件。 I'd like to be able to use it in a windows environment. 我希望能够在Windows环境中使用它。

Currently I'm using pywebkitgtk on my GNU/Linux system, and it works extremely well, but it seems it's not possible to use this on Windows at this time. 当前,我在我的GNU / Linux系统上使用pywebkitgtk,它工作得非常好,但是目前看来在Windows上无法使用它。

Can anyone give me any suggestions on how to proceed? 有人可以给我任何有关如何进行的建议吗? Do I need to work out how to embed IE using COM objects under Windows, and stick with pywebkitgtk on GNU/Linux? 我是否需要弄清楚如何在Windows下使用COM对象嵌入IE,并在GNU / Linux上坚持使用pywebkitgtk?

I'm at an early stage, and am prepared to jettison pygtk in favour of another toolkit, say pyqt, if it affords a simpler solution (though I'd sooner stick with pygtk if possible). 我还处于初期阶段,并且准备抛弃pygtk以便使用另一个工具箱,例如pyqt,如果它提供了更简单的解决方案(尽管可能的话,我会尽快使用pygtk)。

In my experience, having developed cross-platform applications with both PyQt and PyGTK, you should consider moving to PyQt. 以我的经验,已经使用PyQt和PyGTK开发了跨平台应用程序,您应该考虑迁移到PyQt。 It comes with a browser widget by default which runs fine on all platforms, and support for non-Linux platforms is outstanding compared to PyGTK. 默认情况下,它带有一个浏览器窗口小部件,该窗口小部件可以在所有平台上正常运行,并且与PyGTK相比,对非Linux平台的支持非常出色。 For PyGTK, you will have to be prepared building PyGObject/PyCairo/PyGTK, or even the full stack, yourself on Windows and Mac OS X. 对于PyGTK,您必须准备自己在Windows和Mac OS X上构建PyGObject / PyCairo / PyGTK,甚至是完整堆栈。

There is also gtkhtml2 , but might not solve your problem on Windows. 也有gtkhtml2 ,但可能无法在Windows上解决您的问题。 I haven't used it before myself. 我没有用过它。 Another option to consider is pymozembed, to embed a Mozilla browser window in your GTK app. 可以考虑的另一种方法是pymozembed,将Mozilla浏览器窗口嵌入到您的GTK应用程序中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM