First steps in learning GUI in C++ [closed]

Closed. It is impossible to give an objective answer to this question . Answers to it are not accepted at the moment.

Want to improve this question? Reformulate the question so that it can be answered based on facts and quotations.

Closed 6 months ago.

Improve the question

So I started learning the well-known C++language. Working with consoles was not the most difficult stage. Everything was very easy because before this language I had experience in programming.

I wrote both tetris and the snake in the console. All this is very cool, but I would like not just a black screen, but something more, a graphical interface, all sorts of buttons, etc.

So, I have heard that there are many libraries such as:

  1. OpenGL
  2. DirectX
  3. SDL

Well, and others. What else have I heard about Qt, that it is worth starting with it. So here is the actual question:

Why is it better? get started?

Maybe someone has literature or video lessons.

 5
Author: aleksandr barakin, 2013-10-16

4 answers

So what exactly do you need? Study crosses, or learn how to make all sorts of crosses...sorry, guevins (this is from the word GUI, do not think bad)?

If the latter, then C++ is hardly an ideal choice for this. If the first is the case, then it is better to focus on the capabilities of the language itself, and set specific tasks for yourself as you learn. As for the books, look at the answers to this question

But as for the libraries you mentioned, they are directly related to craft riveting windows do not have. These are libraries for working with graphics. If you do not have sufficient knowledge of the language and good reasons to contact them, then I would not be in a hurry to delve into them, you will still have time

 12
Author: DreamChild, 2017-04-12 07:33:09

If you want a " graphical interface, all sorts of buttons, etc.", that is, a GUI, then I advise you to look at Qt or gtk (both are cross-platform).

And as for the listed OpenGL, DirectX and SDL-so these are graphics libraries, they are used together with the gui (a widget with graphics output is embedded, such as QGLWidget), so this is a little different. But it would still be better to use OpenGL (and SDL in conjunction with it is often used for some actions).

As a result, you will get something like Qt+OpenGL (although there are Qt3D and QtOpenGL modules that also use OpenGL).

 6
Author: spirit, 2013-10-16 12:52:37

OpenGL, DirectX, and SDL are libraries for working with 2D / 3D graphics. This is not for the GUI. More precisely, the graphical user interface (GUI) can be drawn there, of course, but this is not the intended use of these technologies (=hammering nails with a microscope)

GUI is QT, GTK (as mentioned above - cross-platform libraries) or MFC for example (WIN32) or direct WINAPI. The latest ones are only for Windows and taking into account the latest trends of this platform (see Windows 8) it is not very useful to invest in their study as most likely they will be abandoned completely.

 6
Author: Andrey Buran, 2013-10-16 17:02:52

Gentlemen, I think you'll forgive me for digging up this topic, but I couldn't pass it by.

I've been doing different GUIs for many years and I know something about it.

There are many cool offices in the GUI area that make their own decisions, but I would focus on three of them:

Telerik Controls, DevExpress, and Nevron.

I do not specifically provide links, because in Google, links for these keywords are counted in the millions.

Briefly about each of them:

Telerik Controls is without a doubt the modern leader among commercial components. First, they are ahead of the rest of the planet in terms of web components. Second, I can't even think of what area they didn't cover: WPF, ASP.NET Core, UWP, WinForms, SilverLight (rest in peace), Xamarin - they have a product for ANY platform in a known part of the universe.

The list of their users includes Kodak, the United Nations, Microsoft, Heinz, the European Union, Accenture, Pfizer, the World Bank, Intel, Citigroup, NASA, Siemens, Nike, IMF, T-Mobile, Reuters, US Armed Forces, Vodafone, NBC, Universal Harvard University, Motorola

DevExpress is a steam locomotive that rushes forward at a speed of more than 100 km per hour. Even 10 years ago, it was a modest set of components for Windows. But since then, they have released a new version every year, and now it is a RICH set of controls that allow you to solve almost any problem with a minimum of code. In addition, they were quite successful a couple of years ago spread out on macOS, and now the two platforms that are generally ASSOCIATED with the GUI are covered by them. Well, the WEB components are at their best. Judging by the speed of development-they are so good that if it were not for competitors-they would take over the world.

Nevron - once a very cool set of components, but now they are a little deflated. In my opinion, they do not spread to other platforms, like the two above, but remain true to WinForms. But they left a good impression of seb, and now they are on monem in the weight category "poor, but clean".

And two more remarks:

1) generally speaking, when working with such components, the language is secondary. That is, the components are "black boxes with handles", and from what language and how to pull these handles - a question of another order. Of course, all of them have recommended combinations with programming languages, but it is better to read about this on the manufacturers ' websites.

(ts-s, I didn't tell you this, but now the maximum is compatibility when developing in Windows - with the C language#)

2) There is a huge number of not commercial, but "free" components. And the supporters of "free" components have their own leaders and so on.

(But I did look-and in short, it's a " pathetic left-hand semblance." But this, of course, is my private opinion.)

 1
Author: S.H., 2019-04-03 09:24:33