当前位置: 代码迷 >> MeeGo >> Meego:为啥是QT
  详细解决方案

Meego:为啥是QT

热度:6060   发布时间:2013-02-26 00:00:00.0
Meego:为什么是QT?
 有不少朋友在问,Meego从Moblin演变过来为什么变成了QT而不用以前的GTK/clutter了?难道只是因为跟nokia的合作吗?

当然跟nokia的合作是一个重要的原因,但QT最为一个Linux最重要的开发平台Meego的选取也是有一定的原因的:

1. 首先QT是一个有广泛支持的平台,有不少的发行版已经首选KDE (基于QT的窗口管理器),例如Kubuntu, OpenSuse,等等,而且相比较Gnome, 这里引用一段话,但不表示我完全认同 8 )

   GTK是用C, Qt用的是C++,这是一个最简单的区别,所以开发程序相对来说,只是相对,GTK的程序执行效率会高些,QT的程序开发环境成 熟,效率高,代码重用高,维护也方便。可能以前由于授权方面的问题,很多程序员选择了GTK,但是现在NOKIA已经发布了开源的版本,这个版权已经不是问题了!还有一个区别就是 QT做出来的图形界面比GTK的好看,因为QT可以生成操作系统原生的界面。如果你是一个C程序员,可以选择GTK,特别是开发gnome桌面的程序,但是在嵌入式平台,我个人推荐选择QT,因为QT在嵌入式平台的开发和应用非常的成熟!当然,最好是动手做个尝试,也许很多时候的选择权并不在你的手里,而是在客户,项目经理或者老板,我仅仅是一程序员而已! 

而且目前Qt已经支持下述平台:Windows、Unix/X11 – Linux、Sun Solaris、HP-UX、Compaq Tru64 UNIX、IBM AIX、SGI IRIX和其它很多X11平台、 Mac OS X、Windows CE、Symbian。 

2. QT有完善的开发工具:相比较gtk,最为商业版本,它的开发工具界面更完整,功能更完善一些。QT的UI designer,虽然我使用的不多,但感觉还是一个非常不错的工具。 

3. 技术支持:QT最为双重授权的中间件,在客户需要的情况下,可以提供充足的技术支持,毕竟这些人是nokia在发工资的 8 ) 

4. 开放的项目:因为历史原因大家对QT的版权一直有些疑惑,下面是我在QT官方网站上找到的一些资料: 

Qt Licenses
We offer Qt under the following licenses:

Qt 
Commercial Developer License
 The Qt Commercial Developer License  is the appropriate version to use for the development of proprietary and/or commercial software. This version is for developers who do not want to share the source code with others or otherwise comply with the terms of the GNU Lesser General Public License version 2.1 or GNU GPL version 3.0. Read more  
Qt GNU LGPL v. 2.1
 This version of Qt is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions contained in the GNU LGPL version 2.1. Read more  
Qt GNU GPL v. 3.0
 This version of Qt is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU General Public License version 3.0 or where you are otherwise willing to comply with the terms of the GNU General Public License version 3.0. Read more  

 License Comparison Chart 


 Commercial
 LGPL
 GPL
 
License cost
 License fee charged No license fee No license fee 
Must provide source code changes to Qt
 No, modifications can be closed Source code must be provided Source code must be provided 
Can create proprietary applications
  Yes - No source code must be disclosed Yes, in accordance with the LGPL v. 2.1 terms No, applications are subject to the GPL and source code must be made available 
 Updates provided
  Yes, immediate notice sent to those with a valid support and update agreement Yes, made available Yes, made available