未来的 Delphi 与 Qt
Delphi 的下一版本是否会发布跨平台支持和基于 Qt 的组件?如果是这样,我们是否必须使用 Qt 进行分发? (我对Qt一无所知) Qt 如何帮助 Delphi 世界,为什么许多使用 C++ 的程序员开始使用 Qt,VCL 会发生什么?
Will the next version of Delphi be released with cross platform support and Qt based components? If so, do we have to distribute with Qt? (I don't know anything about Qt)
How can Qt help the Delphi world, and why did many programmers using C++ start using Qt with, and what will happen to VCL?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
?很大程度上取决于它如何实现,以及 Qt 如何链接到可执行文件。根据使用的 Qt 许可证类型,还会产生一些有趣的影响。 LGPL不是MPL 或 BSD...
Qt 是一个 C++ 库,C++ 开发人员可以直接使用它。从 C++ 使用它来编写可移植应用程序是有意义的。在包装器上创建一个包装器(就像 Qt/VCL 那样)意义不大。他们会走这条路,因为这样可以更快地交付跨平台框架,但他们没有从他们所犯的错误(CLX、VLC.NET)中学到任何东西,并且会再次重复。他们必须将用其 onw 设计编写的库映射到 Delphi 库设计,这意味着要做出很多妥协,而无法控制底层框架。恕我直言,这将像 CLX 和 VCL.NET 一样失败。
Probably. A lot depends on how it will be implemented, and how Qt will be linked to executables. There are also interesting implications depending on what kind of Qt license is used. The LGPL is not the MPL or the BSD...
Qt is a C++ library, and C++ developers use it directly. It makes sense to use it from C++ to write portable applications. It makes a lot less sense to create a wrapper over a wrapper, what the Qt/VCL would be. They will take that road because it's faster to deliver a cross-platform framework that way, but they didn't learn anything from the mistakes they made (CLX, VLC.NET) and will repeat it again. They will have to map a library written with its onw design to the Delphi library design, and it means a lot of compromises without any control over the underlying framework. IMHO, it will be a failure like the CLX and the VCL.NET.
将有一个新的 VCL+ 库,与 VCL“经典”库一起发布。
据我们所知,这个 VCL+ 库将基于 Qt 4。
“经典”VCL 将保留,但仅针对 Windows。
由于 Qt 是基于 C++ 的,因此将有一个包含“平面”版本的库的 dll,可供从 Delphi 代码访问。该 dll 必须与您的应用程序一起发布。由于 Qt 可以静态链接,我猜这个 dll 将包含所有必需的 Qt 代码,可以在 Windows/Linux/MacOsX 上运行。但另一种可能性是拥有一个“平面”dll,它将能够调用其他 Qt dll,当发布新的官方 Qt 更新时,可以有意升级该 dll:最好不要依赖 EMB 来跟踪Qt 升级,即不用购买新的 Delphi 许可证就可以访问更新的 Qt 框架。
我怀疑 Delphi 程序员使用 Qt 的方式将与 C++ 程序员使用该库的方式相去甚远。 Qt 严重依赖宏和预编译(编译 Qt 应用程序非常耗时),而 Delphi 将依赖组件和更经典的类导向(编译速度很快)。
当 Borland 发布基于 Qt 2 的 Delphi 和 Kylix 时,我们只能从 CLX 库做了什么来猜测。我希望他们能从这个实验中吸取教训(CLX 从未被广泛部署/使用)。但 Qt 4 绝对比 Qt 2 更具吸引力。
我们还不知道 VCL+ 对 Qt Core 的依赖程度有多深。 RTL 的某些部分是否会被转换为更好地匹配 Qt 设计?比如多线程和socket会调用Qt Core的相应部分吗?为了跨平台兼容性,不重新发明轮子是有意义的,因为 Qt 工程师已经付出了艰苦的工作并维护它......
There will be a new VCL+ library, released together with the VCL "classic" library.
As far as we can tell, this VCL+ library will be based on Qt 4.
And the "classic" VCL will remain, but targeting Windows only.
Since Qt is C++ based, there will be a dll containing a "flat" version of the library, ready to be accessed from Delphi code. This dll will have to be released with your application. Since Qt can be statically linked, I guess this dll will contain all necessary Qt code, ready to run on Windows/Linux/MacOsX. But another possibility will be to have a "flat" dll which will be able to call other Qt dll, which could be upgraded on purpose, when a new official Qt update will be released: it could be better not to rely on EMB to follow the Qt upgrades, that is not to buy a new Delphi license to have access to the updated Qt framework.
I suspect the way Qt will be used by Delphi programmers will be far away from how c++ programmers use the library. Qt relies heavily on macros and pre-compilation (compiling a Qt application is very time consuming), whereas Delphi will rely on components and more classic class orientation (which compiles quickly).
We can only guess from what was done with the CLX library, when Borland released Delphi and Kylix based on Qt 2. I hope they have learned from this experiment (CLX was never widely deployed/used). But Qt 4 is definitively much more attractive than Qt 2 was.
What we don't know yet is how deep the VCL+ will rely on Qt Core. Will some part of the RTL be translated into better matching the Qt design? For example, will multi-threading and sockets call the corresponding parts of the Qt Core? It could make sense, for cross-platform compatibility, not to reinvent the wheel, since Qt engineers already made the hard work and maintain it...
嗯,根据他们之前的路线图,当前版本(Delphi XE)应该提供跨平台支持;也就是说,为不同的平台(Win、Mac、Linux)编译项目,而不是将 IDE 移植到这些平台。但他们没有提供它,并将其推迟到未来的版本中。
当前路线图仍然模糊;它说他们会提供它,但没有具体的时间范围(64 位编译器预览除外)。 Embarcadero 在没有多次适当通知客户的情况下推迟了预期的功能(例如 64 位支持或跨平台支持),例如,大多数(如果不是说全部)客户不知道跨平台支持被排除在外XE 最多可在正式发布前几周发布。因此,看到他们再次推迟这一计划或完全放弃当前的路线图,我不会感到惊讶。
对于 Qt,根据 Delphi 产品经理 Mike Rozlog 的说法,他对 Delphi Podcast 的采访;他们的跨平台支持将基于之前可用的跨平台库 (CLX) Delphi 6 和 Delphi 7 中。他甚至提到,大多数现有的基于 CLX 的应用程序可以使用新的跨平台功能成功编译。所以如果这没有改变,那么是的,它将是一个 Qt 基础解决方案。 CLX 也基于 Qt 库。
如果是基于Qt的,那么你还必须部署Qt运行时库。在 Linux 中这不应该是一个问题,因为据我所知,大多数 Linux 发行版已经安装了 Qt 运行时。对于Windows,我知道默认情况下它没有安装。我不知道 Mac 操作系统。
Qt 是一个流行且完善的跨平台框架,由诺基亚拥有和开发,免费发布(LGPL 许可证)。 Delphi 可能只是应该使用 Qt GUI 小部件来提供跨平台 GUI 支持,但 Qt 本身包含许多不同的库,几乎适用于任何东西,而只是一个 GUI 框架。
你应该向 C++ 开发人员询问这个问题,但据我所知; Qt 是一个经过验证的跨平台框架,拥有出色的 IDE 和 UI 设计器(Qt Creator),可以轻松地与流行的开发工具(例如Visual Studio)集成,具有良好的支持,您可以找到几乎所有主要编程语言的Qt端口,诺基亚正在使用它作为其当前和未来移动平台的基础软件框架(例如 Symbian^4 和 MeeGo)。
再次提及 Mike Rozlog;他们将保持VCL作为一个基于Windows的框架,并提供一个类似于VCL的新的跨平台开发框架。
Well, according to their previous roadmap, current version (Delphi XE) was supposed to provide cross-platform support; that is, compiling your project for different platforms (Win, Mac, Linux), not porting the IDE to those platforms. But they didn't provide it, and postponed it to future releases.
The current roadmap is still vague; it says they will provide it, but no specific time frame (except for 64-bits compiler preview). Embarcadero has postponed expected features (e.g. 64-bits support, or cross-platform support) without informing the customers properly a few times, for example, most (if not say all) of their customers had no idea cross-platform support was excluded from XE up to a few weeks before the official release. So it wouldn't be a surprise for me to see they postponing this again or totally dismiss their current roadmap.
For Qt, according to Mike Rozlog, Delphi product manager, in his interview with Delphi Podcast; their cross-platform support would be based on their previous cross-platform library (CLX) which was available in Delphi 6 and Delphi 7. Even he mentions that most of existing CLX-based apps might compile successfully using the new cross-platform feature. So if this hasn't been changed, then Yes, it will be a Qt base solution. CLX was also based on Qt library.
If it is Qt-based, then you have to deploy Qt runtime library too. In Linux it shouldn't be an issue, cuz as far as I know, most of Linux distros already have Qt runtime installed. For Windows, I know it is not installed by default. I don't know about Mac OS.
Qt is a popular and well-established cross-platform framework which is owned and developed by Nokia, and is published for free (LGPL license). Delphi is probably just supposed to use Qt GUI widgets for cross-platform GUI support, but Qt itself consists of many different libraries for almost anything, and just a GUI framework.
You should ask this from C++ developers, but as far as I can say; Qt is a proven cross-platform framework, has a nice IDE and UI designer (Qt Creator), can be easily integrated with popular development tools (e.g. Visual Studio), has good support, you can find Qt port for almost all major programming languages, and Nokia is using it as the base software framework for their current and future mobile platforms (e.g. Symbian^4 and MeeGo).
Again referring to Mike Rozlog; they are going to keep VCL as a Windows-based framework, and provide a new framework for cross-platform development which is similar to VCL.