pygtk 的跨平台 html 小部件

发布于 2024-08-20 13:50:19 字数 330 浏览 4 评论 0原文

我正在尝试在 pygtk 中编写一个小型 gui 应用程序,它需要一个 html 渲染小部件。我希望能够在 Windows 环境中使用它。

目前我在我的 GNU/Linux 系统上使用 pywebkitgtk,它运行得非常好,但目前似乎无法在 Windows 上使用它。

谁能给我一些关于如何进行的建议?我是否需要弄清楚如何在 Windows 下使用 COM 对象嵌入 IE,并在 GNU/Linux 上坚持使用 pywebkitgtk?

我还处于早期阶段,准备放弃 pygtk,转而使用另一个工具包,比如 pyqt,如果它能提供更简单的解决方案(尽管如果可能的话,我会尽快坚持使用 pygtk)。

I'm trying to write a small gui app in pygtk which needs an html-rendering widget. I'd like to be able to use it in a windows environment.

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.

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?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

国粹 2024-08-27 13:50:19

根据我的经验,使用 PyQt 和 PyGTK 开发跨平台应用程序后,您应该考虑迁移到 PyQt。它默认带有一个浏览器小部件,可以在所有平台上正常运行,并且与 PyGTK 相比,对非 Linux 平台的支持非常出色。对于 PyGTK,您必须准备好在 Windows 和 Mac OS X 上自行构建 PyGObject/PyCairo/PyGTK,甚至整个堆栈。

In my experience, having developed cross-platform applications with both PyQt and PyGTK, you should consider moving to 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. For PyGTK, you will have to be prepared building PyGObject/PyCairo/PyGTK, or even the full stack, yourself on Windows and Mac OS X.

野却迷人 2024-08-27 13:50:19

还有 gtkhtml2,但可能无法解决您的问题Windows 上的问题。我自己之前没有使用过它。另一个值得考虑的选择是 pymozembed,将 Mozilla 浏览器窗口嵌入到 GTK 应用程序中。

There is also gtkhtml2, but might not solve your problem on Windows. I haven't used it before myself. Another option to consider is pymozembed, to embed a Mozilla browser window in your GTK app.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文