什么是C + + GUI构建选项与最简单的学习曲线 - VS / Qt / wxWidgets / etc。 [英] What's the C++ GUI building option with the easiest learning curve - VS/Qt/wxWidgets/etc.?

查看:129
本文介绍了什么是C + + GUI构建选项与最简单的学习曲线 - VS / Qt / wxWidgets / etc。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够尽可能快速,无痛地构建GUI应用程序。我有能力(虽然不是专家,没有正式的培训)在C + +,但从来没有使用过GUI构建工具包或框架或任何东西。我不是一个专业的程序员,在构建GUI应用程序时完全没有经验和无知。花了几个小时研究试图找出做什么;只是越来越困惑和灰心。



Qt和wxWidgets似乎是跨平台应用程序最受欢迎的选项,虽然跨平台不一定是重要的我; Windows只有很好,如果这意味着最快的学习曲线。



Qt看起来很酷,Qt Creator是很好的演示,除了它有自己的类对于一切,我不是过于热衷于学习一堆东西,只适用于Qt平台本身,而不是更一般。我想我可以避免使用Qt类除了GUI的东西,我必须使用它们,但我不知道明智或不明智的是。



我认为Visual Studio将有最小的学习曲线,但当我打开一个测试GUI应用程序,我看到一堆外国看起来像克拉(^)在所有地方 - 我在网上发现这些意思是手柄,我有困难,甚至理解的定义或目的(类似指针,但不是真的基本上是我读过人们定义它们)。



我知道没有什么关于wxWidgets,或者如何与Qt比较。



因此,每个选项都有一个大的学习曲线 - 最好是我想知道哪一个最小化你的时间花费学习工具包/框架本身。因为我可能永远不会从我创建的程序赚钱,我花费学习一个特定的工具包的时间将是相当昂贵的。我只是想要能够使用C ++知识,我有一个功能程序,但在GUI的形式。目前看来,如果我想制作一个GUI应用程序,我将花更多的时间学习GUI框架,我将使用比编写应用程序本身的功能部分。



任何来自比我更聪明和更有经验的人的输入都会感激:)

解决方案

首先,开始简单。有很多的主题。如果你发现它很难,不要一次尝试,并把它所有。



大多数好的GUI包有教程。我可以给出的最好的建议是,你尝试每一个,或至少几个他们。他们是你可以对图书馆选择最好的简短介绍,如果他们是任何好处,他们缩小你需要吸收起初。这将给你一些比较的基础,因为他们都试图做非常相似的事情(你会看到一些他们在你完成之前),但他们有不同的感觉。你可能会发现你有一个偏好,那是一个认真的。它也会让你知道GUI编程的困难,因为分离从一个包的细节,如果你只使用一个,你不会看到。我个人认为这种知识非常有帮助,因为它使我不那么恐惧的细节。



这里是一个地方的教程列表,虽然你可能已经看到他们已经:




  • Qt的教程

  • WxWidgets教程

  • Gtkmm图书

  • 不是教程。 / ul>

    其次,听起来我需要深入了解GUI编程的概念,而不仅仅是一个特定的库。这里没有一本书的替代品。我不知道所有这些都是一个长镜头,但最好的不只是教你一个工具包的细节,他们会教你一般的概念和如何使用它们。下面是一些开始的列表(一旦你有标题,Amazon和Stack Overflow将有助于选择一个):





    第三,利用设计工具(Qt Creator,VS的表单构建和等等)。 不要尝试读取它们生成的所有代码:首先获取您自己的小程序。否则,太难以知道什么对于一个基本的程序,什么不是。细节丢失。一旦你有了基础知识, 使用它们作为参考,了解如何做特定的效果。如果你可以在设计工具中工作,你可以查看他们生成的特定代码,以便能够尝试自己的手写程序。它们对中间学习非常有用。


    我不太热衷于学习一些只适用于Qt平台的东西


    我第二个注释:不要担心这个。你将需要学习很多具体的工具包,无论你使用哪个工具包。但你也会学习很多,这是 GUI编程与任何一个体面的工具包,因为他们将要覆盖很多相同的理由。布局,事件,小部件/控件之间的交互,理解计时器 - 这些将出现在您使用的任何GUI工具包。



    但是请注意,任何严重的GUI包时间的投资。如果你决定选择一个,你将有一个更容易的时间学习第二个包,但每个大图书馆有它的个性,你的大部分时间将花费在学习它的怪癖。也就是说,我认为,处理任何复杂的主题。


    我想我可以避免使用Qt类除了GUI


    你不需要大部分的非GUI类的Qt正确使用Qt的GUI。有一些异常(例如 QVariant ),你只需要因为GUI类使用它们。我发现你可以根据具体情况学习这些。


    I'm looking to be able to build GUI applications quickly and painlessly as possible. I'm competent (though not expert, and have no formal training) in C++, but have never used a GUI building toolkit or framework or anything. I am not a professional programmer and am totally inexperienced and ignorant when it comes to building GUI apps. Have spent hours researching trying to figure out what to do; only getting more confused and discouraged though.

    Qt and wxWidgets seem like the most popular options for cross-platform apps, though cross-platform isn't necessarily all that important to me; Windows-only is fine if that means the fastest learning curve.

    Qt seems cool and the Qt Creator is sweet looking with lots of good demos, except it has its own classes for everything, and I'm not overly keen on learning a bunch of stuff that's only applicable to the Qt platform itself rather than more generally. I suppose I could avoid using the Qt classes except for the GUI stuff where I have to use them, but I have no idea how wise or unwise that would be.

    I was thinking Visual Studio would have the smallest learning curve, but when I open a test GUI app, I see a bunch of foreign looking stuff like carats (^) all over the place - I found online that these mean "handles", which I have trouble even understanding the definition or purpose of ("sort of like pointers but not really" is basically how I've read people define them).

    I know pretty much nothing about wxWidgets, or how it compares with Qt.

    So every option has a big learning curve - and ideally I'd like to know which one minimizes the time you have to spend learning the toolkit/framework itself. Since I'm likely never going to be making money from the programs I create, the time I spend learning a specific toolkit would be pretty costly. I just want to be able to make a functional program using the C++ knowledge I have, but in GUI form. At the moment it seems if I want to make a GUI app, I'd have to spend way more time learning the GUI framework I'd use than writing the functional part of the app itself.

    Any input from people wiser and more experienced than me would be appreciated :)

    解决方案

    First and foremost, start simple. There's a lot to the subject. If you are finding it hard, don't try and take it in all at once.

    Most of the good GUI packages have tutorials. The best advice I can give is that you try each of them, or at least a couple of them. They are the best short introduction you can have to the library you choose and if they are any good they narrow down what you need to absorb at first. That will give you some basis for comparison, because they are each trying to do very similar things (and you will see some of them before you are done), but they have different feels. You will likely find you have a preference for one and that's the one to get serious with. It will also give you a sense of what's hard about GUI programming as separate from the particulars of one package, which, if you have only used one, you won't have seen. Personally I find this sort of knowledge very helpful, because it makes me less intimidated by particulars.

    Here's a list of tutorials in one place, though you have likely seen them already:

    Second, it sounds to me that you need to get some in depth understanding of the concepts of GUI programming, not just a particular library. Here there is no substitute for a book. I don't know all of them by a long shot, but the best of the bunch will not just teach you the details of a toolkit, they will teach you general concepts and how to use them. Here are some lists to start with though (and once you have titles, Amazon and Stack Overflow will help to pick one):

    Third, take advantage of the design tools (Qt Creator, VS's form building and so on). Don't start by trying to read through all the code they generate: get your own small programs running first. Otherwise it's too hard to know what matters for a basic program and what doesn't. The details get lost. Once you've got the basics down though, Do use them as references to learn how to do specific effects. If you can get something to work in the design tools, then you can look at particular code they generate to be able to try on your own hand-written programs. They are very useful for intermediate learning.

    I'm not overly keen on learning a bunch of stuff that's only applicable to the Qt platform itself rather than more generally.

    I second the comment of GRB here: Don't worry about this. You are going to need to learn a lot specific to the toolkit no matter which toolkit you use. But you will also learn a lot that's general to GUI programming with any of the decent toolkits, because they are going to have to cover a lot of the same ground. Layouts, events, interaction between widgets/controls, understanding timers -- these will come up in any GUI toolkit you use.

    However do be aware that any serious GUI package is an investment of time. You will have a much easier time learning a second package if you decide to pick one up, but every large library has its personality and much of your time will be spent learning its quirks. That is, I think, a given in dealing with any complex subject.

    I suppose I could avoid using the Qt classes except for the GUI stuff where I have to use them, but I have no idea how wise or unwise that would be.

    You do not need most of the non-GUI classes of Qt to use Qt's GUI properly. There are a handful of exceptions (like QVariant) which you'll need just because the GUI classes use them. I found you can learn those on a case-by-case basis.

    这篇关于什么是C + + GUI构建选项与最简单的学习曲线 - VS / Qt / wxWidgets / etc。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆