QT4 与 .Net 相比如何
只是好奇。有没有人有这两种经验。我的直觉是 QT 更适合跨平台应用程序,但 UI 不会那么流畅。 QT 是否更快,因为它无需虚拟机即可编译为本机代码?我认为 QT 也是 C++ 如此不受管理,所以内存泄漏等的可能性更大?
如果我想开发一个非 UI 或控制台应用程序以供跨平台使用 QT4?
如果我想开发一个跨平台的 UI 应用程序,可以使用 QT4 吗?
如果我想开发一个仅限 Windows 的非 UI 应用程序,请使用 .Net?
如果我想为仅限 Windows 的应用程序开发专业的 UI,请使用 .Net?
Just curious. Does anyone have experience with both. My gut feeling is that QT is better for cross platform applications but the UI won't be as slick. Also is QT faster since it compiles to native code with no Virtual Machine? I think also QT is C++ so unmanaged, so there is more chance of memory leaks etc?
If I wanted to develop a non UI or console application for cross platform use QT4?
If I wanted to develop a UI application that was cross platform use QT4?
If I wanted to develop a windows only non UI application use .Net?
If I wanted to develop a professional UI for a windows only app use .Net?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
。 Qt 确实是跨平台的。 (当然,Mono 可以让您在 Linux 上运行 .NET 应用程序...)
取决于你对细节的关注程度。 Qt 使用本机 API 绘制其小部件(过去没有,这导致其 UI 看起来很奇怪),这意味着它的大部分 UI 看起来都相当不错。可能有一些小部件看起来不像您在 WinForms 工具箱中找到的控件,但那是因为它们是不同的框架。
也许吧,这有关系吗?可能不会(顺便说一句,我不会很快说 .NET 一定较慢,我确信在某些地方它实际上表现得更好)。
在
Qt
的代码库中?如果有的话,也很少。在你的吗?大概。我想说这是 .NET 在这个论点中最大的优势之一 - 你可以用 C# 编写。这是一种更更容易学习的语言,您可以获得自动内存管理、庞大的标准库、最好的 IDE 之一和非常优秀的设计器(尽管 Qt 有 Creator)等等之类的东西。 (当然,如果您也以 Linux 为目标,那就是另一回事了)。
Absolutely. Qt is cross-platform, for real. (Sure, there's Mono that enables you to run .NET applications on Linux...)
Depends how much you pay attention to details. Qt draws its widgets with native APIs (in the past it didn't, which caused its UI to look strange) meaning that most of its UI looks pretty good. There might be some widgets that don't look like the controls you might find in WinForms toolbox but that's because they are different frameworks.
Maybe, does it matter? Probably not (btw, I wouldn't be quick to say .NET is necessarily slower, I'm sure there are places it actually performs better).
In
Qt
's code base? Very little, if any. In yours? Probably.I would say this is one of .NET's biggest strengths in this argument - you get to write in C#. It's a much easier language to learn, you get things like automatic memory management, a huge standard library, one of the best IDEs and a very good designer (although Qt has Creator) and many more. (ofcourse if you target Linux aswell, that's a different story).
.net 有多种 GUI 工具包,例如 WinForms、WPF 和 GTK#。
有了 GTK#,只要您的 Linux 用户不因为意识形态原因而回避 Mono,您就可以获得不错的可移植性。
There are several GUI toolkits for .net, such as WinForms, WPF and GTK#.
With GTK# you get decent portability provided your Linux users don't avoid Mono for idological reasons.