Home c++ First steps in learning GUI in C++

First steps in learning GUI in C++




So I started to learn the well-known C++ language. Working with consoles wasn’t the hardest part. Everything was given very easily because before this programming language I had experience.

I wrote both Tetris and a 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 heard that there are many libraries such as:

  1. OpenGL
  2. DirectX
  3. SDL

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

Where to start?

Maybe someone has literature or video tutorials.

Answer 1, authority 100%

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

If the latter, then C++ is hardly the ideal choice for this. If the former, then it is better to concentrate on the capabilities of the language itself, and set specific tasks for yourself as you study. For books, see the answers at this question

But as for the libraries you mentioned, they have no direct relation to the craft of window riveting. These are libraries for working with graphics. If there is not sufficient knowledge of the language and good reasons to contact them, then if I were you, I would not rush to delve into them, you will still have time

Answer 2, authority 50%

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

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

Answer 3, authority 50%

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)

Answer 4, authority 8%

Gentlemen, I think you will forgive me for digging up this topic, but I could not pass by.

I’ve been doing various GUIs for many years and I know a thing or two about it.

In the field of GUI there are many cool offices that make their own decisions, but I would stop at three of them:

Telerik Controls, DevExpress and Nevron.

I do not include links on purpose, because there are millions of links for these keywords in Google.

Briefly about each:

Telerik Controls is undoubtedly the modern leader in commercial components. First, they are ahead of the pack in web components. Secondly, I can’t even think of what area they didn’t cover: WPF, ASP.NET Core, UWP, WinForms, SilverLight (may rest in peace), Xamarin – for ANY platform in a known part of the universe they have a product.

Their list of users includes Kodak, UN, Microsoft, Heinz, European Union, Accenture, Pfizer, 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. 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 this is the RICHest set of controls that, with a minimum of code, allow you to solve almost any task. In addition, they quite successfully used a couple of years ago on MacOS, and now two platforms that are generally ASSOCIATED with the GUI are covered by them. Well, and WEB – their components are at their best. Judging by the speed of development, they are so good that if not for competitors, they would have taken over the world.

Nevron – once a very cool set of components, but now they are a little blown away. 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 themselves, and now they are monem in the “poor but clean” weight category.

And two more notes:

1) generally speaking, when working with such components, the language is secondary. That is, the components are “black boxes with handles”, but from which language and how to pull these handles is a question of a different order. Of course, they all have recommended combinations with programming languages, but it’s better to read about this on the manufacturers’ websites.

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

2) There are a huge number of not commercial, but “free” components. And supporters of “free” components have their own leaders and so on.

(But I looked – and, in short, this is “a pathetic likeness of a left hand.” But this, of course, is my personal opinion.)

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions