QT4 与 .Net 相比如何

发布于 2024-09-27 11:25:01 字数 296 浏览 1 评论 0原文

只是好奇。有没有人有这两种经验。我的直觉是 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 技术交流群。

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

发布评论

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

评论(2

岁月静好 2024-10-04 11:25:01

我的直觉是 QT 更好
适用于跨平台应用

。 Qt 确实是跨平台的。 (当然,Mono 可以让您在 Linux 上运行 .NET 应用程序...)

但用户界面不会那么流畅

取决于你对细节的关注程度。 Qt 使用本机 API 绘制其小部件(过去没有,这导致其 UI 看起来很奇怪),这意味着它的大部分 UI 看起来都相当不错。可能有一些小部件看起来不像您在 WinForms 工具箱中找到的控件,但那是因为它们是不同的框架。

QT 是否更快,因为它无需虚拟机即可编译为本机代码?

也许吧,这有关系吗?可能不会(顺便说一句,我不会很快说 .NET 一定较慢,我确信在某些地方它实际上表现得更好)。

我认为 QT 也是 C++,因此不受托管,因此内存泄漏等的可能性更大?

Qt 的代码库中?如果有的话,也很少。在你的吗?大概。

我想说这是 .NET 在这个论点中最大的优势之一 - 你可以用 C# 编写。这是一种更容易学习的语言,您可以获得自动内存管理、庞大的标准库、最好的 IDE 之一和非常优秀的设计器(尽管 Qt 有 Creator)等等之类的东西。 (当然,如果您也以 Linux 为目标,那就是另一回事了)。

My gut feeling is that QT is better
for cross platform applications

Absolutely. Qt is cross-platform, for real. (Sure, there's Mono that enables you to run .NET applications on Linux...)

but the UI won't be as slick

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.

is QT faster since it compiles to native code with no Virtual Machine?

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

I think also QT is C++ so unmanaged, so there is more chance of memory leaks etc?

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

仙女山的月亮 2024-10-04 11:25:01

.net 有多种 GUI 工具包,例如 WinForms、WPF 和 GTK#。

  • GTK# 在 Linux 上工作得最好,在 Windows 上也能正常工作
  • WPF 仅适用于 Windows atm
  • WinForms 在 Windows 上是本机的,但在 Linux 上使用用 C# 编写的控件,因此在 Linux 上看起来不是本机的。

有了 GTK#,只要您的 Linux 用户不因为意识形态原因而回避 Mono,您就可以获得不错的可移植性。

There are several GUI toolkits for .net, such as WinForms, WPF and GTK#.

  • GTK# works best on linux, and decently on windows
  • WPF is windows only atm
  • WinForms is native on Windows, but uses controls written in C# on Linux, and thus doesn't look native there.

With GTK# you get decent portability provided your Linux users don't avoid Mono for idological reasons.

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