Qt Tutorial : C++ Notepad App

preview_player
Показать описание

I thought it would be fun to make a real app in this Qt Tutorial, so I made a working Notepad app. We'll install Qt for Windows and MacOS. Then we'll cover Qt Basics, Dialogs, Widgets, Drag and Drop Interfaces, Creating / Opening / Saving Files, Menus, Toolbars, Icons, Printing, and much more.

Qt is an amazing framework for creating cross platform C++ GUI applications.

MY UDEMY COURSES ARE 87.5% OFF TIL February 13th ($9.99) One is FREE

Like the channel? Consider becoming a Patreon! Check it out here:

*Watch More Learn in One Videos*
Рекомендации по теме
Комментарии
Автор

Learn in One Videos for Every Programming Language

derekbanas
Автор

As of mid-Apr 2020 the toolbar is no longer included automatically. To get it, right click on your MainWindow object in the Object Tree [whatever you want to call it, the top right] and select add toolbar.


Thanks for the vid Derek.

narnbrez
Автор

I'm speechless. I don't know what to say. a fully functional notepad app in 30 minutes?! that's amazing Derek. you killed it. some people compare you with other youtubers but in my opinion you are incomparable. you are AWESOME. keep up the good job

masoud
Автор

Thank you for this tutorial. I stopped C++ 18 years ago when I started C# at work and I feel the need to go back to my roots and you refresh my old C++ knowledge + teach me Qt at the same time.

fredericroland
Автор

Uninstalling VSCode now... Just wrote the only text editor I'll ever need.

contrazzed
Автор

I learned more in this video than my entire Fall semester.

ImpulseGundam
Автор

I just downloaded Qt based on a recommendation from a friend, as soon as I saw your name pop up in a tutorial search I knew I'd learn something! Thanks, Derek!

carlyc
Автор

You are my hero, Sir. I had some issues with some missing Kits, but that was fairly easy resolved as the installer only installed QT STudio and not QT itself. I run the QTMaintainance Application and Added QT under Components. Cheers Mate.

HephaistosForge
Автор

This is a true Derek Banas instructional video! In 2015 I did a project with Qt and C++ but then I did not had the Qt IDE available to use. It was an automatic control loop to verify the functioning of pressure transducers. My collegues all went on a Qt course, but on assigning parts of the project they discovered that they were one man short so they asked me. But I had not followed the Qt course. I read a book and just started using it and I finished the project with full satisfaction. I recently discovered that I used a lot the Facade Design Pattern to simplify the Qt calls. Guess where I learned to bring Design Patterns to practice. Thanks for the extra fun you bring in programming to the world.

FritsvanDoorn
Автор

Finally 😍 derek starts Qt series 😍😍 thanks man

oussamasingle
Автор

A repository of knowledge, you are. Just a 20 year old checking in here; I strive to someday share this quality with you. I love this passion you have of teaching complete strangers all that you know.

russelwebb
Автор

You, Derek Banas, are everywhere :-) I've been through most of your C++ tuts for my job, and I also need to dive into Qt (pronounce "cute" ;-) ) and of course, I found you here. You're the best! You're a hero.

dancobb
Автор

This was brilliant sir!
Not sure how I would learn Qt without you!
Thanks a bunch!

johnsknows
Автор

i guess printSupport changed,

#include <QtPrintSupport/QPrinter>

#include <QtPrintSupport/QPrintDialog>

AnalogDude_
Автор

Alright time to recreate the entirety of the Borland C++ IDE

soda
Автор

This is really helpful in re-acquainting myself with Qt. However, for newbies like me, it's incredibly confusing when objects or variables are given names that could be confused with objects built in to Qt e.g. "text", "fileName" or "textFile". In C++ and other languages I work with I use prefixes such as "str" for Strings (strMyString), "bool" for Boolean (boolCycleIndex), "int" for integers (intCyclesToGo) or "flt" for floating point variables (fltDistanceToTheMoon). I look forward to following more of your tutorials.

BobCornell_nbd
Автор

Tired of seeing Hello World examples, why cant there be more tutorials out there that jump right into the action? We need more people like Derek in the world. Let's help him get rich. Who's with me on this?

thefamily
Автор

OMG freaking awesome been waiting for this Qt tutorial!! Thanks Derek!!

chukwuka-steveorefo
Автор

To make the app more complete it would be nice to handle the cases when a user presses cancel/X instead of specifying the file path/name in Open or Save as. The return value in these cases is an empty string, so:
if (fileName.isEmpty()) return;

To add a custom icon one can add the following to the main file:


The .exe file will be represented by the icon in Explorer if one adds in .pro file:
RC_ICONS = your-icon-name.icon-extension

LinaAliceAnderson
Автор

If anyone is having problems with including QPrinter and QPrintDialog, it worked for me when I typed
#include <QtPrintSupport/QPrinter>
#include <QtPrintSupport/QPrintDialog>

I don't know if it works correctly, but the error messages disappeared :)

kateryna