跨平台GUI语言/工具包 [英] Cross-platform GUI language/toolkit

查看:108
本文介绍了跨平台GUI语言/工具包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个跨平台的GUI应用程序,该应用程序将部署到Windows,Mac OS X和Linux。我的要求是:

I am attempting to write a cross-platform GUI application that would be deployed to Windows, Mac OS X, and Linux. My requirements are:


  1. 所有三个部署平台的单一代码库,而没有用于处理平台之间差异的大量条件逻辑。
  1. Single code base for all three deployment platforms, without a large amount of conditional logic for handling differences between platforms.
  2. Looks as close to "native" as possible on all three platforms.
  3. Easily distributable to all three platforms, in the sense that it could be easily installed by end users and does not suffer from extreme bloat (as discussed in this ArsTechnica article.)

基于这些要求,我将工具包的选择范围缩小到Qt和wxWidgets,因为我所了解的其他工具包(包括Java的Swing和SWT,Flex,AIR等)都不满足本机外观需求。在这最后两个竞争者中,Qt似乎为我所有三个部署平台上的本机应用程序提供了更好的支持,但我愿意考虑相反的观点。

Based on these requirements, I've narrowed down the selection of toolkits to Qt and wxWidgets, since none of the other toolkits that I know about (including Java's Swing and SWT, Flex, AIR, etc.) satisfy the "native-looking" requirement. Among these two final contenders, Qt appears to offer better support for applications that look and feel native on all three of my deployment platforms, but I'm willing to consider opinions to the contrary.

我不希望使用C ++作为实现语言,但是我不确定是否有任何实用的选择。对于使用除C ++之外的其他实现语言,我最大的担心是部署问题。如 Ars Technica文章,PyQt从任何实际意义上都无法满足轻松部署要求,而且我怀疑Qt的大多数其他语言绑定也会遭受相同的部署问题(在QtJambi?QtRuby?wxPython?的Java(或Scala)?

I would prefer not to use C++ as the implementation language, but I'm not sure if there are any practical alternatives. My biggest concern about using an implementation language other than C++ is the deployment problem. As discussed in the Ars Technica article, PyQt does not meet the "easy deployment' requirement in any practical sense, and I suspect that most other language bindings for Qt would suffer from the same deployment problems (at least on Mac OS X). Java (or Scala) with QtJambi? QtRuby? wxPython?

任何人都知道满足所有以上要求中的三个

推荐答案


  1. 这取决于您的需求。通用的Qt Framework(使用任何语言)和Java SE(使用任何语言)要好得多,因为它不仅具有跨OS的GUI库,而且还具有跨OS的网络,线程……wxWidgets仅是GUI。

  2. Qt和wxWidgets都很好。以我的经验,Qt更好。Swing是...嗯,不是很好。

  3. 用C ++编写的Qt和wxWidgets应用程序以及Java Swing应用程序都不难在Windows,Mac和Linux上部署。规则是,当您使用本机语言进行编程时,部署很简单。 本机语言是指框架本身使用的语言。




PyQt不符合任何实际意义上的轻松部署要求...

PyQt does not meet the "easy deployment' requirement in any practical sense...

Python(以及默认实施为解释器的任何其他语言)应用通常情况下很难部署(我是说以独立可执行文件的形式)。

Python (and any other language with the default implementation as interpreter) apps is hard to deploy in the usual sense (I mean in form of standalone executables).

因此,您可能有2个选择:

So probably you have 2 choices:


  1. C ++ / Qt或C ++ / wxWidgets。

  2. 如果本机外观不是很严格的要求,则使用Java / Swing。

这篇关于跨平台GUI语言/工具包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆