BEST WAY to make Desktop Applications in C++

For all your web hosting needs (use coupon code CHERNO for a discount!) ► hostinger.com/cherno
Support on Patreon and get Hazel! ❤️ ► / thecherno
Instagram ► / thecherno
Twitter ► / thecherno
Discord ► / discord
Dear ImGui ► github.com/ocornut/imgui
Chapters:
----------------
0:00 - Intro
0:34 - Why use C++ for apps?
3:52 - What's the solution?
4:27 - Dear ImGui, examples + pros and cons
8:26 - Getting started with Dear ImGui
12:00 - Speedrun - making an app
22:27 - How to ship the app
25:01 - Final thoughts + more
This video is sponsored by Hostinger.

Пікірлер: 1 400

  • @Person-hb3dv
    @Person-hb3dv2 жыл бұрын

    This could definitely be a whole series of it's own

  • @kiiikoooPT

    @kiiikoooPT

    2 жыл бұрын

    Agreed, I learn so much about c++ with him on the sparky Engine, I used to have all the videos from that downloaded and in a disk wich I unfortunatly lost, but I had it there to start programing and not getting lost around youtube only VS open in 1 monitor and the playlist from the disk playing in the other monitor. I'm still a noob very very noob in programing, but is people like Cherno that gave me the desire to program and make my own stuff, I wish he made this an updated series with making something maybe not as indeep as the sparky game engine, but with a real end goal, to see the result at the end. I learn by watching and tweaking myself, in coding I try to do the same thing as I see, but I name variavels and functions classes in my own language, to know what I'm looking at and to be easier for me. Even if I understand almost perfectly the english language, is still easier to right names and comments in my own language, since Im righting them down for me. All the projects I had with programing in various languages, C++ from cherno, php, c# C, got also lost in that disk, and I being wanting to start something again, trying to recover what I did before, so a new series would be motivational... Btw I didnt really lost it all, I still have the disk, but It is damaged, I wont work, so is kind of like lost, but hopefully I will manage to repair it one day and recover all 900gb of stuff I had in there, or at least the stuff that was important wich would make like 100gb almost, the disk was on red marker as used space, it had like 200mb free or something, maybe that is why it got broken, from accessing it all the time and for being active almost 24/7, the read heads is what are broking, they keep jumping when I turn it own, so maybe if 1day I find a similiar disk I will try to recover the old one, or break the new one to in the process lol

  • @r_be

    @r_be

    2 жыл бұрын

    100% agree

  • @_Rishabh_Kumar

    @_Rishabh_Kumar

    2 жыл бұрын

    Definitely.

  • @popplestones886

    @popplestones886

    2 жыл бұрын

    Would love that

  • @alexandershubert573

    @alexandershubert573

    2 жыл бұрын

    Agree! That’s super impressive and useful

  • @Revoker1221
    @Revoker12212 жыл бұрын

    My god, what perfect timing. Been spending the better part of the last week figuring out how to do cross platform programming using platform layers. This is immensely welcome information, many thanks for the upload.

  • @kepler_22b83

    @kepler_22b83

    2 жыл бұрын

    And for me it's late... Rly, I've spent many hours investigating this stuff years ago.

  • @knightcrawler9734

    @knightcrawler9734

    2 жыл бұрын

    Dude same, It was so weird that he uploaded this when I needed it the most lol

  • @RandomBananaInk

    @RandomBananaInk

    2 жыл бұрын

    You might be interested by Tauri. Imagine Electron but lightweight with a Rust backend(and more possibility in the future)

  • @nicolazara7060

    @nicolazara7060

    2 жыл бұрын

    literally saaaaame

  • @MrFedX

    @MrFedX

    2 жыл бұрын

    Was thinking to my friend about this yesterday and lo and behold, there’s a video for exactly what I needed!

  • @chriswinslow
    @chriswinslow2 жыл бұрын

    C++ GUI tutorials are very few and far between. Most beginners such as myself crave GUI based tutorials and not the endless CLI based tutorials. This can and will help motivate more people to code in C++ if they can be guided through the messy and limited eco system of C++ GUI development. Thanks Cherno, I still regard as one of the best KZreadrs for C++ programming and someone who explains the importance of certain system resources like memory.

  • @gamerk316

    @gamerk316

    Жыл бұрын

    The main problem is there haven't historically been a lot of good GUI frameworks to work with; at my workplace our in-house engineering apps still mainly use MFC, which is a PITA unless you know the pitfalls. [Classic example: Horizontal Scrollbars are a lot more complicated then just enabling the property. And don't even get me started on Message Maps.] That's one reason why I love C#; all that nonsense is hidden from the user.

  • @AleksandrStrizhevskiy

    @AleksandrStrizhevskiy

    Жыл бұрын

    I definitely agree. I just stumbled upon this video now. A few weeks ago I was trying to figure out which application to use for a C++ student project and eventually settled on Qt. Wish I found this sooner.

  • @LugayiziIsma

    @LugayiziIsma

    Жыл бұрын

    yeah bayby

  • @boring1930

    @boring1930

    11 ай бұрын

    @@AleksandrStrizhevskiy i CANT EVEN DOWNLOAD QT IT SHOWS 200 DAYS JUST FOR INSTALLATION

  • @AleksandrStrizhevskiy

    @AleksandrStrizhevskiy

    11 ай бұрын

    @@boring1930 Ouch that is rough man :(. Maybe you can be more selective with which packages you are downloading. Did you accidentally download every Qt version in history?

  • @MrAstrals
    @MrAstrals2 жыл бұрын

    Actually, I do have good experience using Qt for GUI. The recipe is quite simple - do not under any circumstances let the Qt code creep in the app itself. Just keep it for GUI. Basically, it turned out as a plain C++ app with a thin Qt layer with QML on top of it.

  • @robbie2044

    @robbie2044

    2 жыл бұрын

    Yep, I am doing the same thing. Just using QT for GUI and writing normal c++ code in their respective files. Sometimes I help myself with some QT code like datetime, regex, etc but that is really rare. Worked this way for about 2 years now and really had no issues. QT also releases UI components frequently so you have a lot of options. I tried ImGui and as Cherno said, I only use it for debugging (console inside main application or such). I could switch because I after all this time I know how ImGui works but kinda just don't need it...

  • @marria01

    @marria01

    2 жыл бұрын

    I've been developing cross-platform apps with Qt for nearly 20 years. If you want to spend your time writing and maintaining platform specific code for threading, networking, process control, IPC etc. that's great. I don't have the time.

  • @stardustspirit

    @stardustspirit

    2 жыл бұрын

    May I ask why? I'm trying to learn C++ right now so that I can learn Qt in the future. Is this a best practice that I don't know about yet?

  • @robbie2044

    @robbie2044

    2 жыл бұрын

    @@stardustspirit Qt can be used a Visual IDE for C++. It is same if you wrote your code in WINAPI which is quite tiresome. So basically you will code in c++ and use QT to make GUIs easier (forms, buttons, textbox, timer, etc). You don't have to use QT C++ at all, just pure c++ you are learning.

  • @zvxcvxcz

    @zvxcvxcz

    2 жыл бұрын

    @@marria01 There are some other non-platform specific solutions for each of those, so you may not want to use the QT implementation necessarily.

  • @ark_ryl9384
    @ark_ryl93842 жыл бұрын

    I used to mainly program C++, but the lack of nice UI libraries was what made me switch to C#. I'd love to see this as a full series!

  • @master138

    @master138

    2 жыл бұрын

    I think Qt is good enough

  • @paulabrudan7896

    @paulabrudan7896

    2 жыл бұрын

    Ah yes cause WinForms is way better than QT, GTK and the tons of other options we have

  • @poulet_malassis7607

    @poulet_malassis7607

    2 жыл бұрын

    @@paulabrudan7896 cuz you think there's only WinForms and it's the best C# can actually offer? Please, try to be honest at least. Plus, every tool has its use and its public, wether it is C# or C++ frameworks, there's no need for offended "he attacked my favorite toolchain" reactions like yours. As a junior C# developper, I am very curious about other languages and C++ especially, but sometimes languages fans look like they are in a cult.

  • @poulet_malassis7607

    @poulet_malassis7607

    2 жыл бұрын

    @@paulabrudan7896 now condescending? Just keep it this way dude. It's the perfect way to make people see your point. Which is btw, erm, well I can't see. Now I'm gonna watch some Bjarne interview, just to see what a real C++ specialist - cuz you certainly aren't one - has to say. Oh and he's not a douche, but quite an agreable guy.

  • @poulet_malassis7607

    @poulet_malassis7607

    2 жыл бұрын

    @@paulabrudan7896 and when did I "complain about languages"?

  • @alfold2000
    @alfold20002 жыл бұрын

    I'm up for a series of this. This would fit into the openGL series btw.

  • @nad6234
    @nad6234 Жыл бұрын

    Super helpful. As a professional C/C++ developer from the 80's, GUI development has always been a real pain in the arse, usually involving a giant hack on a hack. Especially if you need a dynamically changing interface. - thanks again; downloading it now. Oh and yeah, a series on this would be fab.

  • @gamerk316

    @gamerk316

    Жыл бұрын

    Co-signed. My workplace still uses MFC for its in-house apps. :/

  • @3rdGen-Media

    @3rdGen-Media

    Жыл бұрын

    @@gamerk316 Oh god

  • @gamerk316

    @gamerk316

    Жыл бұрын

    @@3rdGen-Media Yep. Mainly because it's what our developers know. And let me be clear: They are some excellent coders, but there's been a general resistance to moving to something like Qt. Do note most of what we have GUIs for are just for test, so we don't need anything flashy. Still, compared to even something like Windows Forms for C# MFC is a PITA to work with. I'm taking it upon myself to learn Qt in the hope I can (eventually) move to that as everyone else hits retirement.

  • @3rdGen-Media

    @3rdGen-Media

    Жыл бұрын

    @@gamerk316 That's funny bc I face resistance over eliminating Qt and adopting current gen graphics APIs. I know Qt quite well but my opinion is it's bloatware on the order of boost for the problem that it solves. I'm not sure I would make the decision to integrate dependence on Qt today unless the GUI was actually needed by end users on both Windows and *Nix platforms. I tried to make a comment with my suggestions on how to handle GUI for a xplatform C/C++ app on each platform but it keeps getting deleted. I'm not really sure why my reply to your comment didn't. After having done this for X years and having worked with ImGui and Noesis my MO is to favor forking a library with available source that wraps GDI (eg Netease Duilib) for Windows targets and to execute app code in parallel with Cocoa's run loop to build the UI for Darwin targets, rarely having a need for a client facing app on Linux. The main reason for this is that it becomes easier to hand off the UI to the existing library infrastructure or extend for situations that demand the application's 3D render context (if present) handle the UI like ImGui or Noesis. This tradeoff comes with its own amount of overhead in terms of mental comprehension and environment setup.

  • @user-ww2lc1yo9c

    @user-ww2lc1yo9c

    2 ай бұрын

    Qt?

  • @THExRISER
    @THExRISER Жыл бұрын

    You have no idea how much i needed this video, I'm using ImGui for my SFML-based game engine, but I wanted to learn how to use it to build desktop applications but was too experienced to do so, thank you so much Cherno, not only did you help me learn C++, but now you're helping me with more advanced stuff!

  • @kiwec
    @kiwec2 жыл бұрын

    Wow, that docking branch is amazing. Great video, no time wasted rambling, going straight to the point.

  • @mihaiplesa5218
    @mihaiplesa52182 жыл бұрын

    This is awesome, please make a full series from start to begging with this. Thank you for all the time you put into this channel.

  • @andythedishwasher1117
    @andythedishwasher11172 жыл бұрын

    This was a super liberating tutorial. The way you frame these processes and the fast pace at which you manage to successfully convey advantages and disadvantages to different options is something I don't see on KZread that often. Probably going to be doing some in-depth code-alongs with your work in the near future. Well done, bud.

  • @Admer456
    @Admer4562 жыл бұрын

    I was thinking about frameworks I could use to develop cross-platform GUI tools for Half-Life modding. I initially settled for Qt, but I think I changed my mind now. ImGui is small, simple and gets the job done and that's exactly what I need. Thanks Cherno!

  • @mlecz
    @mlecz2 жыл бұрын

    It would be amazing if you did a series on How to get a UI exactly like hazel from absolute scratch, including custom Title bar with logo, styles of drop boxes, buttons, inputs etc. Btw. Great video, thanks for your work ! :)

  • @trv4505

    @trv4505

    2 жыл бұрын

    Bump

  • @AvihayBar

    @AvihayBar

    2 жыл бұрын

    +1

  • @nullpointer1755

    @nullpointer1755

    2 жыл бұрын

    up

  • @theinventor8793

    @theinventor8793

    2 жыл бұрын

    Well, thats what he's doing with the current game engine series

  • @mlecz

    @mlecz

    2 жыл бұрын

    @@theinventor8793 What do you mean ? Game Engine series are long movies in which most of them are implementing features responsible for 3d rendering, physics etc. ImGui coding elements in that series give the impression of additional side topics which are not explained with due diligence. Also consider that someone who wants to create an SVG animation editor is not going to watch a series on GameEngine. A dedicated series for Dear ImGui would be ideal because this can be applied to any application not just GameEngine.

  • @malolan98
    @malolan982 жыл бұрын

    Yes, please! A tutorial from scratch would be lovely!

  • @CodeParticles
    @CodeParticles2 жыл бұрын

    @The Cherno, I've been using the docking feature for ImGui ever since you mentioned it in your Game Engine Series two years ago and STILL use it today for my side projects. I get asked about it all the time and I point them to that docking branch like you said, Works every time~ 👍👍

  • @simonkufeld7903
    @simonkufeld79032 жыл бұрын

    the detailed explanation and the context are very helpful, I like your style of explaining/communicating

  • @kkapuscik
    @kkapuscik2 жыл бұрын

    I think you mixed two things: the ImGui is focused on creating user interfaces, while both Qt and wxWidgets also have other components like threading or networking, and a lot of higher-level helpers - so they act more like a frameworks and not just "ui libraries". Also when creating larger applications you have to think about topics like I18N, L10N, testability etc. - and here I think ImGui provide basic or no support at all. It is still a great library but saying it is the right choice for everyone is like making a statement: "bike is a best vehicle of all".

  • @SumoCumLoudly

    @SumoCumLoudly

    2 жыл бұрын

    Qt is the obvious choice, qt creator is actually a pretty good ide. There are some licence issues as cherno mentioned but the vast majority of things you need are free, think charts and 3d are the thing you'd need to pay to licence. Qt has excellent documentation at as well.

  • @williamrgrant

    @williamrgrant

    2 жыл бұрын

    True. Don’t libraries such as Boost take care of a lot of those other platform tasks you mentioned?

  • @davidstephen7070

    @davidstephen7070

    2 жыл бұрын

    the problem is dll that need to include so big. qt can't split it by feature that use. it just include everything bloat code that increase total application need to deliver.

  • @SumoCumLoudly

    @SumoCumLoudly

    2 жыл бұрын

    @@davidstephen7070 yh deploying is a bit of a nightmare, installing a static build of qt is the best option but it's not trivial and takes a long time to build

  • @ORagnar

    @ORagnar

    2 жыл бұрын

    Another thing is that often it's the functionality underneath that needs the computational power, not the GUI part. Running a graphics engine can take up resources. None the less, I'm enjoying learning about ImGui. 5/3/22, 9:17 a.m.

  • @StevenMartinGuitar
    @StevenMartinGuitar2 жыл бұрын

    He's alive! Been checking in for new vids every now and again. Looking forward to watching this later.

  • @pogchamp1081

    @pogchamp1081

    2 жыл бұрын

    Same

  • @maltepedersen9180

    @maltepedersen9180

    2 жыл бұрын

    Well, I believe he had a kid since last video ;)

  • @leonardobaleon810
    @leonardobaleon8102 жыл бұрын

    I’m working on a little side project and this is just what I needed! Great content as usual.

  • @fatalerrordriveb
    @fatalerrordriveb2 жыл бұрын

    I'd love to see you do more ImGui content. This is really cool and I'd love some good videos showing what can be done with it, or building from scratch with it.

  • @jonathantribble7013
    @jonathantribble70132 жыл бұрын

    I am very interested in a series like this! I hope you continue! Beginner-2-Pro would be much appreciated.

  • @johnsonbick5152
    @johnsonbick51522 жыл бұрын

    always good to see a vid from the Cherno. Huge contribution to all of us that want to learn and grow from people like u. Thanks for the effort as always

  • @LongestYardstick
    @LongestYardstick2 жыл бұрын

    Holy crap, best video ever -- thanks!! Would absolutely love to see more about this. However, this video by itself was amazing. The speedrun gets huge style points :)

  • @eliasgeiger5445
    @eliasgeiger54452 жыл бұрын

    Awesome video, again. I gotta try this out someday. Still my favorite source for learning programming stuff, especially C++ and Game Engine related topics. I have to say it's always a joy to see you programming while explaining things. One can tell that you're skilled and very good at what you are doing. Keep up the good work.

  • @hgmdev
    @hgmdev2 жыл бұрын

    This is a step back. We're going back to the days when we made the interface into code. At what not the small code. And to make it beautiful, you need to write more code. Everything that was shown can be done visually. In a matter of minutes. Moreover, imGUI is poorly integrated with the OS. It is foreign to the OS. Font issues, high resolution issues. Etc. For example, look at the "dying" Delphi. On the cross-platform FMX framework. It allows you to build simply incredibly beautiful interfaces that will work both on desktops (Windows, Linux, MacOS) and mobile OS (Android, iOS). The interface is also rendered on the GPU, but all the problems with working as a native application are solved. And the possibilities of the window designer are simply impressive. You can style any element however you like. With any animation and effects. And at the same time, apply this style to any other elements. There are two designers in FMX, one for interface and one for style. Yes, even style can be designed visually.

  • @asfaerfadfasdfsadf5211

    @asfaerfadfasdfsadf5211

    2 жыл бұрын

    I work in delphi. I can make Interfaces in seconds, and i love it.

  • @ufookoro1
    @ufookoro12 жыл бұрын

    This is fantastic stuff. I am not a C++ programmer. I code in Python, but I learn a lot from your Game Engine series and now this!!! Absolutely brillaint. Just love to see all the possibilities whatever the language. Keep up the good work

  • @dudenwatschn8312

    @dudenwatschn8312

    Жыл бұрын

    Just as a heads up, there's a python wrapper for imGUI called dearpygui, and it's an absolute treat to work with. If you get the chance, it's absolutely worth a try!

  • @equivocator7727
    @equivocator77272 жыл бұрын

    I love the quick look nature of this video. No need to spend 5 minutes explaining something simple, just get through the important bits fast!

  • @kaoboom
    @kaoboom6 ай бұрын

    Thanks for introducing this fantastic library with this quick, yet easy to follow, setup video!

  • @adamvancampen2509
    @adamvancampen25092 жыл бұрын

    My god, that was strong return to vmaking videos. Well done! Would love to see a "from scratch" app built around this.

  • @umairalvi7382
    @umairalvi73822 жыл бұрын

    This is what i needed. I just love c++ and i wanted to make a real gui application in c++ thats itttt.

  • @connorsullivan5996
    @connorsullivan59962 жыл бұрын

    This is amazing. I would love to see one (or more) videos on this. Thank you very much Cherno!

  • @Ishbosheth.
    @Ishbosheth.2 жыл бұрын

    THANK YOU SO MUCH I have been wanting to make my own application for a while but have had no idea how to start since I'm not very good at coding This will be a super helpful resource to learn, and I'd love to see more videos like this!

  • @JohnMcCormack
    @JohnMcCormack2 жыл бұрын

    Yes, please! A tutorial from scratch would definitely be welcome!

  • @brianbathory4943
    @brianbathory49432 жыл бұрын

    A series on ImGUI would be very cool to see. I wanted to get into it a while ago but I was having trouble figuring out a lot of stuff even with the demo GUI they ship with but I've always wanted to dive deep into it regardless

  • @mgstivig585
    @mgstivig5852 жыл бұрын

    Yeeey, we need more of this, it is amazing and it seems to be really easy, barely an inconvenience

  • @avsync-live
    @avsync-live2 жыл бұрын

    I would also love a whole series for this topic!

  • @sayedammanakhtar1225
    @sayedammanakhtar12252 жыл бұрын

    It would be great if this could be a whole series of its own 🤞🤝

  • @quantumapprentice8120
    @quantumapprentice81202 жыл бұрын

    12:40 I would LOVE to see a series explaining the details of creating a gui with imgui!

  • @ruddymolina7044
    @ruddymolina70442 жыл бұрын

    I will start to use it in my next project. Thanks a lot.

  • @colinmaharaj
    @colinmaharaj2 жыл бұрын

    Hey, I started using C++ Builder in 1998 as a RAD tool, and does very very well as a GUI designer and never looked back, it's commercial, but I think it's spectacular.

  • @feschber
    @feschber2 жыл бұрын

    The only problem I see with ImGUI is, that it doesnt integrate with any native gui toolkits. Everything is client side rendered and it will not look like a native application on *any* device. If you don’t care about that (and for many usecases you probably won’t, including gameengines obvsly) its awesome.

  • @feschber

    @feschber

    2 жыл бұрын

    @Lucas depends on the use case but yeah I agree that a good ui is more Important than a native one.

  • @demonicious_

    @demonicious_

    2 жыл бұрын

    @Lucas It's not only due to how it looks, and i'll also argue that "Native" UI isn't bad in all cases (Apple's Design System for iOS and Mac) - Another reason why you might wanna use native ui is for your users. Especially on mobile, they'll be used to one type of UI with the gestures they're familiar with and a consistent navigation style. Having a non-native app could hurt the user experience on various platforms.

  • @theblinkingbrownie4654

    @theblinkingbrownie4654

    2 жыл бұрын

    @Lucas unless your users customize their native themes, very popular in the linux community which I plan to make apps for.

  • @Jonas_Meyer

    @Jonas_Meyer

    2 жыл бұрын

    @Lucas I would disagree here. Depends on the use case but if your not a UI/UX designer its properly better to go with the native UI. I have seen some terrible design in the past.

  • @YouTubeOfficial-Shorts

    @YouTubeOfficial-Shorts

    Ай бұрын

    Damn, learn to program the morals of your people against Palestine instead of learning programming. Believe me, it will be better for all of humanity.

  • @silverdr
    @silverdr2 жыл бұрын

    In fact I was positively surprised with Qt as a framework when I had to develop cross-platform native application not long ago. The framework appeared to me as solid, mature and well documented, with quite supportive community around it. The major PITA though is bundling for distribution, aka "deployment". Static linking's also not for the faint of heart, unfortunately. So it's not all oh-so rosy but the development was much much smoother than I anticipated.

  • @Troyseph

    @Troyseph

    2 жыл бұрын

    I've found windeployqt to be helpful for deployment on Windows, you can integrate it into a qmake or cmake file so that your build folder is essentially ready to zip and distribute

  • @silverdr

    @silverdr

    2 жыл бұрын

    @@Troyseph in the simplest case yes, yet if I use a framework like Qt I don't do it for Windows-only applications. That's for cross-platform applications. But even if it was for Windows alone, major problems started once I needed to bundle a few more things than Qt libs only. Yes, I eventually managed to bundle things on all platforms but it was far from a smooth ride and definitely I'd prefer using the time I spent on this for something more productive. Having said that - as I mentioned in my original comment - the overall impression remained very positive. Much better than I anticipated.

  • @ZombieLincoln666

    @ZombieLincoln666

    2 жыл бұрын

    well yeah of course Qt is mature.. it's been around since 1995

  • @ParhamSalamati
    @ParhamSalamati2 жыл бұрын

    God you're brutally fast, reliable & into the point on explaining things that I wish you could teach everything I needed to learn! Would save me a heck of a lot time dude! Great job :D

  • @kwazar6725
    @kwazar67253 ай бұрын

    Did what u do starting from 1985. Nice to see your enthusiasm. Written game engines before, loved c++ still do, but now run mgmt and love to help folks learn. Wish they wanted to know fundamentals like you do.

  • @ghostravenstorm385
    @ghostravenstorm3852 жыл бұрын

    Good timing on this video. I'm halfway through building a GUI prototype app at work that has a C++ preference because it wants to use DDS to communicate with other DDS modules my company has. But, like you said, qt and etc have been awful to work with. So I'm mainly building the GUI in C# with some C++ interop. I'm very happy you showed off imgui. Please consider a FromScratch tutorial.

  • @jonstarritt848
    @jonstarritt8482 жыл бұрын

    This was a great intro to imgui! As someone who knows just enough C++ to get into trouble, a video on setting this up from scratch would be greatly appreciated!

  • @MrVideInfra
    @MrVideInfra Жыл бұрын

    This was super helpful to start creating new tools for my project. Thanks a lot Cherno!

  • @asdasdaa7063
    @asdasdaa706311 ай бұрын

    Thank you Cherno, its really amazing how you explain everything so clearly

  • @Jonas_Meyer
    @Jonas_Meyer2 жыл бұрын

    I actually like QT because they have a SerialPort library that is cross platform and all my project interface with some hardware over serial. Also its really nice that everything has the same API style.

  • @superscatboy

    @superscatboy

    2 жыл бұрын

    Once you get used to Qt it's quite a pleasant experience IMO, but the learning curve to get to that point can be a little rough. As you say, it has a consistent API, and once you get used to its quirks (QObjects, the MOC etc.) it's nowhere near as painful as it seems at first. It's not great if you just want to get something up and running quickly, as you have to learn its "philosophy" before you can make any real progress. The licensing looks pretty painful to deal with from a commercial standpoint, and I fully appreciate that can be an issue in a number of situations.

  • @MFRSIAM

    @MFRSIAM

    2 жыл бұрын

    @@superscatboy how do you get started with qt in the 1st place though, is there any good resources like cherno ? .

  • @TheIgoorR

    @TheIgoorR

    2 жыл бұрын

    Try boost, it has one too, but the implementation is better)

  • @anonymouscyborg5610

    @anonymouscyborg5610

    2 жыл бұрын

    @@MFRSIAM thier documention if you are using qt designer

  • @jackneill8233

    @jackneill8233

    2 жыл бұрын

    Qt is great. I use it to write a program running on Raspberry 4 and communicating with three ESP32 boards over SPI channels. Hier you have everything you need, the Qt IDE for Raspberry and all possible open source C/C++ libraries

  • @thelazyrabbit4220
    @thelazyrabbit42202 жыл бұрын

    I would love to see a whole in-depth series on this!! as a python programmer seeing my first love c++ do such amazing things makes me want to do it again!

  • @alanmcintyre9296
    @alanmcintyre92962 жыл бұрын

    Thank you SO MUCH for a right-to-the-point video about ImGui. I've been meaning to add UIs to debug windows for a computational geometry project for a while...if I'd known it was this easy I would have done it years ago!

  • @syedasimhussainrizvi2165
    @syedasimhussainrizvi21652 жыл бұрын

    Talk about timing. I was struggling with this question just yesterday

  • @LawnMeower
    @LawnMeower2 жыл бұрын

    This is brilliant. I'd love to see more on this

  • @JakobJenkov
    @JakobJenkov2 жыл бұрын

    Java + JavaFX is also an option for apps that do not require all the power of C++, but still more power than JavaScript + HTML + DOM. JavaFX can run on Windows, Mac, Linux, iOS, Android and Raspberry Pi (because it's Linux). That's reasonably broad. JavaFX has hardware accelerated graphics, so it performs reasonably well, and it's open source. With GraalVM you can even compile your Java + JavaFX to a native executable for these platforms.

  • @sudoLife
    @sudoLife2 жыл бұрын

    Definitely up for a series of these.

  • @MrJonsi7777
    @MrJonsi7777 Жыл бұрын

    It is so crazy, my intentions of learning c++ to develope a performant app always take me to a Cherno video. Thank you so much for all these quality videos!

  • @Quettesh
    @Quettesh2 жыл бұрын

    I have good experience with QT. Not with the GUI apps exactly, but I love their huge library for work with data structures.

  • @christianm4906
    @christianm49062 жыл бұрын

    Well I have a pretty good experience with Qt in its open-source version. It's quite powerful and easy to use. In fact, it offers plenty of functionality beyond GUI such as database manipulation, networking, threads, file system operations, I/O, audio, video, complex data structures and algorithms, Bluetooth, etc. Qt is absolutely cross-platform and supports almost every device you can imagine: smartphones, embedded systems, windows, linux, macOs, bsd, and browsers across webassembly. Without to mention that Qt allows you to operate with a powerful declarative language known as QML in which you can easily prototype any GUI design you want while being productive.

  • @SentientNr6

    @SentientNr6

    2 жыл бұрын

    I actually like Qml but hate that everything is wrapped via QObject, you need MOC, macro's and it has a weird object lifecycle which was maybe ok in 1998 before we had smart pointers. Also I don't like that all objects have this huge list of virtual methods where have of them don't make sense in the context you're using. eg. If I want to send an event I have to create a QObject which I can then query whether it's a widget? Qt is the no1 example of separation of concerns principle violation. Furthermore quite often you can find a small library doing exactly what you need without enforcing an object model on you. And then I don't even mention the licensing model. And then you understand why the force everything to be a QObject and tie everything together. Once you start using it it's hard to get rid of since the Object model spread all over the place where it shouldn't. And if you invested in this, you'll keep paying licensing.

  • @christianm4906

    @christianm4906

    2 жыл бұрын

    @@SentientNr6 Well, I think your claims are more opiniated than facts, and they are a bit exaggerated. First of all, not every class in Qt requires MOC or need to inherit from QObject and if so it's not too bad to have such functionality either. In fact, MOC provides useful staff such as safe alternative for dynamic casting without relying on standard RTTI. Notice that RTTI might not be supported in certain devices/compilers. But more importantly, the MOC solves a problem that Bjarne Stroustrup forgot which is a mechanism for communication between objects. As you can guess, this mechanism in Qt is known as signals and slots which clearly promotes separation of concerns. With signals and slots, your objects can easily communicate without having to know anything about each other. Although the signals/slots mechanism is a bit slower than the callback mechanism, users won’t even notice the difference, besides, this mechanism provides benefits over the callback hell from a more software engineering perspective. On the other hand, signals/slots are not the only example in which separation of concerns is well promoted in Qt. The model view delegate framework which is the MVC implementation in Qt allows you to guarantee separation of concerns in a very elegant way. Through composition/encapsulation you don’t even need to mix your models with QObject classes. In fact, your models can be anything you want such as custom c++ class without any Qt code. Separation of concerns is up to the developer and in the case of MVC, just keep a clear separation of the Qt model view delegate from your custom classes/data. You also highlighted that you don’t like having a method to know whether a QObject is a widget. Well, this is not a problem of Qt but a common consequence of inheritance in general, but honestly, this is not even a problem overall. I personally like having the method isWidgetType() which offers me a much faster alternative than dynamic cast and it's not a problem whatsoever to have such method in inherited classes. To finish, the lifecycle mechanism of QObject is not too bad either and you can somehow avoid it if you prefer to work with smart pointers.

  • @vindecode5837
    @vindecode58377 ай бұрын

    I like your content so much, the cherno there is so much to learn about c++ with you.

  • @MrSteves2001
    @MrSteves20012 жыл бұрын

    Top job super clear, would love a longer tutorial vid.

  • @rezakarimi6034
    @rezakarimi60342 жыл бұрын

    Great Video. Please continue C++ series alongside a new series for Desktop Applications with C++ and compare all the available tools and libraries. That would be wonderful :)

  • @voxelfusion9894
    @voxelfusion98942 жыл бұрын

    I love Qt, and I think it's important to use mature frameworks that support accessibility options and proper system integration and theming. Using some bespoke little framework can often be easier for simple projects, but often skips many big underlying features that are crucial to lots of people.

  • @bpelectric
    @bpelectric Жыл бұрын

    Definitely do want more content on imgui and setting a project up from scratch

  • @lavycube3521
    @lavycube35212 жыл бұрын

    Yes please upload more videos explaining this! I've just made a program in cpp and want to make it actually look good and not just to be on the cmd.

  • @SandeepKumarP
    @SandeepKumarP Жыл бұрын

    A series on this would be great. It can be an independent series which does everything from scratch including styling. In The end, it can plug into the OpenGL and Game Engine series.

  • @rafaeldeconde8148
    @rafaeldeconde81482 жыл бұрын

    Awesome video! Thank you very much Cherno! consider doing the "Dear IMGUI project from scratch" video, please!

  • @dukedblu
    @dukedblu2 жыл бұрын

    Thanks! I was looking for something like this some time

  • @orrensingh4592
    @orrensingh45922 жыл бұрын

    More! Full series would be awesome

  • @theoathman8188
    @theoathman81882 жыл бұрын

    Or maybe I'm just soo obsessed with knowing every detail, and I can't sleep at night knowing my own application that I have built and spent time on, is doing things behind my back that I'm not aware of. I know Cherno you're that person :)

  • @SeraphixD3
    @SeraphixD32 жыл бұрын

    This video is right on time for some software I'm working on! I too would like to avoid working with Qt, because it is very unflexible and my boss is (probably) paying a licence fee for it. The whole docking thing makes ImGUI look very useful for basically anything and I really should start using this branch for most of my C++ stuff.

  • @vladimirkraus1438

    @vladimirkraus1438

    2 жыл бұрын

    Qt in "unflexible"? Could you elaborate on that? It is LGPL, do for most usecases it is free to use.

  • @SeraphixD3

    @SeraphixD3

    2 жыл бұрын

    @@vladimirkraus1438 I was thinking of the Qt Framework and its unflexible layout. No 3D background, no easy docking like this ImGUI version, as far as I know (EDIT: apparently it can do docking at least, never mind. Still, I find Qt complicated).. I did not yet test Qt with QML which is supposed to be more felxible in that way. But for commercial use Qt is not free anyway, I think.

  • @vladimirkraus1438

    @vladimirkraus1438

    2 жыл бұрын

    @@SeraphixD3 No 3D in Qt? Bullshit. Of course you can use 3D. It is only that you are too lazy to google. Docking - of course its is there. One basic docking system (QDockWidget) and one advanced (KDDockWidgets). And unflexible layouts? You must be kidding, Mr. Noob.

  • @vladimirkraus1438

    @vladimirkraus1438

    2 жыл бұрын

    @@SeraphixD3 Regarding commercial use - it is free even for commercial use as long as you comply with LGPL license. Which is quite simple actually. I have worked for two big companies which used Qt for really large projects (one of them was Ricardo which was doing the best in class physics simulation tools for automotive industry, the code base of the simulation tools had over 5 millions of rows, which is definitely not a small project), yet they still were able to comply and ship their software with LGPL license of Qt!

  • @dmytroboiko1
    @dmytroboiko14 ай бұрын

    This is very helpful! Thanks Cherno!

  • @ChrisM541
    @ChrisM5412 жыл бұрын

    What a fantastic, full and wide featured and easy to use tool - and what a brilliant video introducing the newcomer to ImGui. Very helpful and yes, more on its use please. Thank you!

  • @containedhurricane
    @containedhurricane2 жыл бұрын

    Great explanation! You're one of the best teachers on KZread

  • @rickiewars
    @rickiewars2 жыл бұрын

    Needed this video like 3 years ago. Just thought, i'll just stick with wx-widgets and now you convinced me to switch to imgui. I realy would be interested in more video's on imgui on how to get started from scratch and maybe some basics on customizing the ui looks (like top-bar height, colors, fonts, etc.) Again great video, keep up this good work!

  • @TheMR-777

    @TheMR-777

    2 жыл бұрын

    So how was the expereince with wx_Widgets?

  • @rickiewars

    @rickiewars

    2 жыл бұрын

    @@TheMR-777 the experience was ok but couldn't get the ui look right for my taste. Also for linux, it uses gtk which looks a bit out of place (and also not quite unique) on qt-based desktops, which i mainly use (kde). Imgui also looks a bit out of place but it also looks a bit more unique. Also, after some research, i've found that you can customize imgui quite a bit. I've been out of the gui programming for a bit now unfortunately so my knowledge and experience has faded a bit but I'm now working on a project which may require an gui soon. Sorry for the late response, I had missed your reply.

  • @TheMR-777

    @TheMR-777

    2 жыл бұрын

    @@rickiewars It's completely fine, And, I am also learning GUI in Qt, still on early phases. WxWidgets also looks Win32 looky on Windows. But as you said about ImGui, that it's customizable, I will then give it a try, in deep. By the way, your Reply matters :), whether early or late, and Thanks a lot for that!

  • @jacksparrow3442
    @jacksparrow34422 жыл бұрын

    Yes Cherno! Need a video on building apps with ImGui from scratch. Thanks!

  • @larsleo7059
    @larsleo70592 жыл бұрын

    I was just looking for a nice C++ GUI framework and this popped up in my subs. Thanks a lot, will dive a little deeper into it :)

  • @papasmurf9146
    @papasmurf91462 жыл бұрын

    I would definitely watch more on ImGui. Using a larger font when showing code would be useful (to me anyway). First blush, there is a significant amount more boilerplate code to get started with than Qt. Qt licensing is certainly a concern, even for company internal projects. The qt.io seems to deliberately obfuscate the issue to try and get you to buy their license or hire a lawyer or both.

  • @papasmurf9146

    @papasmurf9146

    2 жыл бұрын

    @Ram Rod Thanks for the input. That was pretty much my conclusion as well. Qt seems bent and determined to scare people away from using the LGPL version unless they hire a lawyer. I have always liked the object-oriented approach of Qt -- especially the decoupling of classes via slots and signals. It's too bad they couldn't have started with C++ 17. The moc preprocessor would have gone away along with the criticisms of needing it.

  • @marco21274

    @marco21274

    2 жыл бұрын

    @Papa Smurf Moc could go away with reflections in C++ 26. Actually loose coupling with signal slots has drawbacks. It is harder to understand and debug because the connection can be happen everywhere. The order of execution is not well defined if you connect multiple times to one signal. This can easily lead to bugs etc..

  • @papasmurf9146

    @papasmurf9146

    2 жыл бұрын

    @@marco21274 I've been playing with signal/slots in C++ 17 and it seems to be going well. Regarding connecting (I'm assuming) the same object to the same signal multiple times, that can be coded for in the Signal class. But such a problem also points out that the developers probably don't have a consistent philosophy of when things like connections should be performed. I view loose coupling in the same way that I view object oriented -- a great solution for many problems, but not the right solution for all problems. If you're in an environment where slot order of a signal is significant then slot/signals paradigm is probably a bad fit to begin with. But I would be loathe to throw away my hammer just because I need a saw for the problem at hand.

  • @marco21274

    @marco21274

    2 жыл бұрын

    @Papa Smurf My experience of over twenty years of programming with Qt is that Hyrum's Law will be make your order depending. 😉 But this order is implicit and hard to understand. If there is only one connection per slot everything is fine.

  • @papasmurf9146

    @papasmurf9146

    2 жыл бұрын

    @@marco21274 While I have used Qt for the last 10 to 14 years, I'll defer to your greater experience with such issues. I haven't encountered them. But I've also been exceptionally lucky with high quality team mates and who seem to have dodge those sorts of inter-dependencies. That said, one of the guys on our team came from a big name development environment that was developing with Qt. His experience at that location was similar to what you describe. He said debugging was an absolute nightmare because you never know what's triggering the code that is blowing up (and therefore what the conditions are for debugging). He was a little leery of our home-grown framework, but once he got up to speed had nothing but nice things to say about it. It significantly helped that we had a pretty linear path. A signals B signal C signal D, but (almost) nothing signals backward. (A might signal multiple Bs and B might be signaled by multiple As, but the flow was pretty linear). The team was also pretty strict about a class does one thing and one thing only. That helped keep an understandable and clean code base.

  • @Balldir
    @Balldir2 жыл бұрын

    I think QT is pretty good for desktop GUI app. It has good quality source and good architected. But yes - it has a bit complicated stuff (non c++ standard memory management model \ thread model \ signal slots) under the hood.

  • @darling4316

    @darling4316

    2 жыл бұрын

    Qt is outdated

  • @ruffianeo3418

    @ruffianeo3418

    2 жыл бұрын

    @@darling4316 If Qt is outdated, which other is not? Gtk is plain ugly, Tcl/TK clearly outdated... so what is "current"? I don't like wasting energy with an immediate mode GUI and prefer redraw-when needed kind of green guis.

  • @charlesm.2604

    @charlesm.2604

    2 жыл бұрын

    @@ruffianeo3418 Gtk is not ugly at all, it's supposed to ran on the Gnome desktop environement. Look up Gnome 3 screenshots and tell me it's not the most beautiful desktop environement you've ever seen. The problem with QT though is the licensing. I'm not gonna pay that much for something that could easily be free, even for commercial uses, on alternative stacks. I feel like the best way to go with resource-intensive cross platform apps is to build the core in a low-level language like C++ and use a different language for the UI. Or to go with a deamon approach, open up a port on localhost and have a proxy on the UI side.

  • @marco21274

    @marco21274

    2 жыл бұрын

    @Charles M. Hmm, Qt is LGPL, Gtk is LGPL. Yes you can buy a commercial license for Qt. But you can still use the LGPL version.

  • @charlesm.2604

    @charlesm.2604

    2 жыл бұрын

    @@marco21274 You can't most times, there are conditions.

  • @dev_ression
    @dev_ression2 жыл бұрын

    hands down the best explanation on here!

  • @mat_name_whatever
    @mat_name_whatever2 жыл бұрын

    At work I am currently using Qt Quick to build a UI application. I'm having the worst time everrrr. Really: Imagine hell on earth, but you are also on fire but also there are fireantspiderscorpions all over you and also you are depressed but also angry. It is siphoning light and happiness from anyone in a 5 meter radius while being used for development. Yes, it is measurably that bad! In addition to that, all the Qt programmers I personally interacted with have a brain that must be internally based on goto's and octuply-nested-ifs. One time I searched how you could create a dashed line and the first person in the thread in the official form posted you should just create the dashes as individual little UI-Elements/Rectangles. The next person corrected them, saying their approach was inappropriate and bad, the obvious and clean approach was then to make a very long and thin Canvas and draw rectangles on it. I think I'll stick to punchcards next time.

  • @voxelfusion9894

    @voxelfusion9894

    2 жыл бұрын

    The real answer is to use a line element and set its draw brush from solid to dashed. It's trivial.

  • @mat_name_whatever

    @mat_name_whatever

    2 жыл бұрын

    @@voxelfusion9894 drawing on a long and thin canvas that is - which is still nasty (No offense, not your fault ^^ )

  • @pryflack3646
    @pryflack36462 жыл бұрын

    Yeah coming from web dev I’d love to see more of this, especially how to style the GUI. Showing how to create a few basic UI components would be nice too, using click listeners, etc. Nicely put together, thanks :)

  • @nikolaytomov4919
    @nikolaytomov49192 жыл бұрын

    Thank you! Going to try it now

  • @wentworthmiller1890
    @wentworthmiller18902 жыл бұрын

    Wow! Definitely a series on this please!

  • @arroyjose
    @arroyjose Жыл бұрын

    I’m not a Qt expert but what I’ve seen so far is pretty good. The applications my company builds are complex and Qt is more than capable. The latest version of the IDE alone seems quite good.

  • @Deescacha

    @Deescacha

    Жыл бұрын

    I sadly have to work with Qt every day and it's absolutely horrible. Requiring people to use that awful editor is just the tip of the iceberg. Coming from Visual Studio it feels like a trip back to the 90s.

  • @fudgesauce
    @fudgesauce2 жыл бұрын

    The advantage of wxWidgets it is uses native widgets for each platform. I haven't looked into ImGui, but I imagine if you open a file dialog box, it looks like an ImGui file dialog, not a windows file dialog or an osx file dialog. For some applications it doesn't matter, for others the users may care.

  • @madeso

    @madeso

    2 жыл бұрын

    Dear Imgui doesn't have any built in dialogs. Depending on use case you either write your own, call the os dialog or bring in another library that does one of those two things.

  • @joachimk6540

    @joachimk6540

    2 жыл бұрын

    You can easily integrate your app with native file dialogs (see on github).

  • @fudgesauce

    @fudgesauce

    2 жыл бұрын

    @@joachimk6540 -- what if I want to run my app on windows and OSX and linux? Then I need three code bases, one which invokes windows APIs to get dialog boxes on windows, one that invokes OSX APIs to get dialog boxes on OSX, and one that invokes GTK APIs to get dialog boxes on linux. The entire point of cross platform GUI libraries is to avoid such duplications. With wxWidgets, I can invoke, say, a file dialog, and I will get a native file dialog widget on all three platforms with a single codebase.

  • @isodoubIet

    @isodoubIet

    2 жыл бұрын

    @@fudgesauce Yeah I was really confused when cherno described this project as "cross-platform" and then opened a list of projects targeting each platform. That's not what "cross-platform" means.

  • @johannweber5185

    @johannweber5185

    2 жыл бұрын

    @@isodoubIet If one wants a cross-plattform and easy-to-use C++ toolkit, I think that FLTK is also a nice option.

  • @mascit
    @mascit2 жыл бұрын

    Thanks to you I've discovered this fantastic project. Today I've started with contributions in the PyImgui repo, a project that maps imgui C++ -> python. Love this!

  • @furkangonulal1355
    @furkangonulal13552 жыл бұрын

    Do more of these pls, we need it :D

  • @gianlucalocri
    @gianlucalocri2 жыл бұрын

    Wow I think would be amazing to see how to structure a real world app using imgui. I'm using wpf with mvvm pattern to make modular loosely coupled desktop app. I wonder if the same can be achieved with c++ and imgui. That would mean amazingly performant cross platform applications!

  • @reneb86
    @reneb86 Жыл бұрын

    I don't share the frustration about Qt's usage, but I'll give Dear imgui a try. Frameworks such as Qt really do deserve a share of revenue though, as they really do a lot of overlooked heavylifting for a development team.

  • @aacfox
    @aacfox6 ай бұрын

    Everything... Everything you listed at the end need we!

  • @user-if6cv8eo3f
    @user-if6cv8eo3f2 жыл бұрын

    Hi Cherno! Great that you are promoting Dear ImGui to everyone! I have some good experience in it, and it is definitely a "breath of fresh air" in comparison to OOP oriented GUIs) It feels so easy to do anything (Even some actual cute user interfaces are possible)

  • @fluxx2875
    @fluxx28752 жыл бұрын

    Finally someone who understands the potential of ImGui 🙌🏻 I'm currently even working on a layer to make the use of ImGui even easier, with a simple markup language. In my opinion the code can get quite messy if you get into styling and alignment with ImGui.

  • @beeeeeee42333
    @beeeeeee423332 жыл бұрын

    Wow the video quality is soo smooth ! kudos for extra video making skills , those motion zoom, video shakes m, such small effects feel too good , rather than plain video talking .

  • @DFPercush
    @DFPercush2 жыл бұрын

    A follow up video about layouts, more explicit positioning of elements, and events beyond a simple button click would be great. Like when an element gets focus, when the value of a text box changes, generic key down on a random element, etc.

  • @cw3dv
    @cw3dv2 жыл бұрын

    yoo very happy to see ya back! ur videos are treasures!

  • @beeeeeee42333
    @beeeeeee423332 жыл бұрын

    I Knew this was coming , ! 🧡 The way you explain things not theocratical , but also practical makes programming fun ! By far most crystal clear C++ gui video ever on youtube :) #cherno

  • @ifanyoneremember1315

    @ifanyoneremember1315

    2 жыл бұрын

    This video made me to learn ImGui 🙂 #cherno thanks

  • @F1nalspace
    @F1nalspace2 жыл бұрын

    Imgui is a really awesome library! I use it too and even made an example in my platform abstraction library (libfpl). But i didn´t knew that there is a "docking" branch, so i shocked by your video here. Incredible how it is implemented: You drag a window outside, a new window is created on-the-fly. You drag it back into the main window, the outer window is destroyed. Damn i need to add multiple window support into my lib... but this would break the entire design because its stateless like glut :-( Also i also would love to see more ImGui topics from you - especially when it comes to styling.

  • @goatnamese
    @goatnamese2 жыл бұрын

    This is a life-changing video. You have no idea how much of a butterfly effect this video has on my future projects.

  • @M3t4lik
    @M3t4lik Жыл бұрын

    Thanks a million Cherno. IMGUI is by far one of the best and easiest apps I've have used to date. Like most, coding in Windows can make feel like a glutton for punishment and going through all the tomes of classes and handlers to get them working exactly the way you want. This works like a charm especially with the latest Vulkan SDK and is so much better than doing all that crazy windows groundwork from scratch. Definitely exploring Walnut next. Cheers.

  • @Djellowman
    @Djellowman2 жыл бұрын

    I'd like to know what you think of SDL2 for a GUI. I'm using it right now for a boardgame gui & used sfml in the past

  • @weirddan455

    @weirddan455

    2 жыл бұрын

    SDL2 doesn't do much for you for creating a GUI. It can create a window and handle events, and let you draw whatever you want into that window but it doesn't have built in functions for creating buttons, menus, text boxes, etc. that a real GUI framework will do for you.