用 C++ 编写 GUI 应用程序时使用的最佳库是什么?

What is the best library to use when writing GUI applications in C++?(用 C++ 编写 GUI 应用程序时使用的最佳库是什么?)
本文介绍了用 C++ 编写 GUI 应用程序时使用的最佳库是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

可能的重复:
Gui 工具包,我应该使用哪些?

我有相当多的 C/C++ 经验 - 主要用于为 Windows/Linux 编写控制台应用程序,以及相当多的 C# 经验 - 通常用于编写 WinForms 应用程序等.

I've got a fair bit of C/C++ experience - mostly for writing console application for Windows/Linux, and also a fair bit of C# experience - generally for writing WinForms applications etc.

我对在 .net 中轻松创建窗口印象深刻,例如像这样简单的东西

I'm extremely impressed with with ease at which I can create a window in .net, for example something as simple as

Form form = new Form();
form.ShowDialog();

足以在屏幕上显示一个空白表格.事实上,

is enough to get a blank form up on the screen. In fact,

new Form().ShowDialog();

技术上就足够了,只要我们不介意在表单关闭后丢失对表单的引用.

is technically enough as long as we don't mind losing reference to the form after it's closed.

我尝试过使用 windows.h 用 C++ 编写一些基于 Windows 的 GUI 内容,但不仅学习曲线看起来有点陡峭,而且语法也非常冗长.使用 windows.h.

I've tried writing some windows-based GUI stuff in C++ using windows.h, but not only does the learning curve seem a little steep but also the syntax is extremely verbose. Creating a simple window like the above mentioned single line .net implementation can easily exceed 2 dozen lines using windows.h.

但不仅如此,如果我要将应用程序移植到 Linux/Max(这是我几乎永远无法用 .net 做的事情,除了像 mono 等黑客),那么我需要重写 95% 的 GUI 代码.

But not only that, if I were to port the application over to Linux/Max (something which I can pretty much never do with .net, with the exception of hacks like mono etc), then I would need to rewrite 95% of the GUI code.

我假设这是框架的用武之地,例如 QT 等......(恐怕我对 gui 框架不太了解).

I'm assuming this is where frameworks come in, for example QT etc... (I don't really know much about gui frameworks, I'm afraid).

您推荐哪些 GUI 框架?哪些功能最强大,哪些最容易使用?您通常如何处理使用 C/C++ 编写 GUI 的任务?

What GUI frameworks do you recommend? which are the most powerful and which are the easiest to use? How do you generally tackle the task of coding your GUI in C/C++?

推荐答案

Qt,放下手.

它是最完整、最成熟、最快的框架.最重要的是,它是真正的多平台平台,您可以选择商业友好的开源或付费支持.

it's the most complete, most mature, fastest framework available. and on top of it, it's seriously multiplaftorm and your choice of commercially friendly open source or paid support.

这篇关于用 C++ 编写 GUI 应用程序时使用的最佳库是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

What do compilers do with compile-time branching?(编译器如何处理编译时分支?)
Can I use if (pointer) instead of if (pointer != NULL)?(我可以使用 if (pointer) 而不是 if (pointer != NULL) 吗?)
Checking for NULL pointer in C/C++(在 C/C++ 中检查空指针)
Math-like chaining of the comparison operator - as in, quot;if ( (5lt;jlt;=1) )quot;(比较运算符的数学式链接-如“if((5<j<=1)))
Difference between quot;if constexpr()quot; Vs quot;if()quot;(“if constexpr()之间的区别与“if())
C++, variable declaration in #39;if#39; expression(C++,if 表达式中的变量声明)