HomeОбразованиеRelated VideosMore From: thenewboston

C++ GUI with Qt Tutorial - 6 - Signals and Slots

622 ratings | 100848 views
Facebook - https://www.facebook.com/TheNewBoston-464114846956315/ GitHub - https://github.com/buckyroberts Google+ - https://plus.google.com/+BuckyRoberts LinkedIn - https://www.linkedin.com/in/buckyroberts reddit - https://www.reddit.com/r/thenewboston/ Support - https://www.patreon.com/thenewboston thenewboston - https://thenewboston.com/ Twitter - https://twitter.com/bucky_roberts
Html code for embedding videos on your blog
Text Comments (58)
Nigel Murillo (6 months ago)
Thanks so much for explaining the "::" and "->"!!
Harsh soni (11 months ago)
But how can i add another function make different things when clicked.....
Ashley Hart (1 year ago)
Hey Bucky, I was wondering if you could make videos of each widget in Qt. Because you're the only one who really explains all of it well and also because I have difficulties making a Table widget.. it looks like the table widget is so full of options but complex at the same time. Anyways, thanks for your videos, you're the best
Tam Jid (1 year ago)
@5:19 why "hopefully" ?
Rheginald Delacruz (1 year ago)
Please help me I am having a problem on the program. Every time I run the program nothing appears on my screen not even the button. I am using Qt 4.4.1. Please help me thank you :)
lib xo (1 year ago)
pls make for gtk+ in c/c++ .
mengxing (2 years ago)
来支持一下
Nicky J (3 years ago)
You are my favorite tech/programming tutorials guy in the entire YouTube, thank you for been there for all of us!!!
Gafurov Zafar (3 years ago)
oh , hello theya !
At Line 7 I was wondering "since when did C++ become LISP?"
Vikas Choudhary (3 years ago)
you're awesome man.
Wulframm Rolf (3 years ago)
did he ever explain about the 'new' keyword or what stack and heap memory is in his older videos?
Teh Meh (3 years ago)
+Wulframm Rolf He actually mentioned that you need some basic understanding of C++ before enrolling in this course and as long as these ''new'' are not deeply interfering with the heap, I guess this QT tutorial is not the place to explain that
Jo L Rico (3 years ago)
Lol, all I hear is "Oh hello there" with an English accent lmaol You are awesome dude.
MyLearningLab (4 years ago)
You explain C++ in a very easy to understand way. Thank you.
samrockseagle (4 years ago)
Awesome Bucky. Thanks a lot for the great videos.
Anton Loomit (4 years ago)
Video about signals and sluts^_^
Orpheus (4 years ago)
Hey Greg how come you aren't properly deleting that pointer (i.e delete button;)? Is it already done automatically in that last 'return prog.exec()'?
Hugo Gayoso (5 years ago)
Nice videos , dude!
Lemmonio (5 years ago)
really great videos. thanks!
Martin Fracker (5 years ago)
I'm a litle curious as to why you use the new operator instead of instantiating the class normally i.e QPushButton button("Quit"); this will return a button object rather than a pointer, so that we can say button.show() instead of having to de-reference it first.
Martin Fracker (5 years ago)
+MrKillius24 I've recently begun to understand this actually. Often times we use the new operator to dynamically allocate on the heap so that our objects survive when they go out of scope.
Killius (5 years ago)
because the pointer acts as a transformer to transform the object into char * for the function
habib ullah (5 years ago)
you are awesome :)
Stuart Kerr (5 years ago)
Bu'hen
Follow The Light (5 years ago)
That is because he isn't teaching console programming anymore.
BigHuNtAh (5 years ago)
I learning so much from you. You are genius! You should be our EE Professor! Well you are mine :) Thank you so much!
Mr_Burkes (5 years ago)
Why don't you ever delete your pointers?
Merlin Webster (6 years ago)
Your Pronunciation of the word 'Button' is upsetting me XD. Although I am British... Love the tutorial though!
Shahnawaz Khan (6 years ago)
YOU HAVE GREAT ABILITIES TO TEACH
AutumnWater6 (6 years ago)
Thanks for this tutorial, its really good :)
Keith (6 years ago)
Ohe hallo dayre =D
StormCrow (6 years ago)
Signals and sluts.
billigerfusel (6 years ago)
i know that feel bro
Yannick Mortier (6 years ago)
Probably you forgot to include some file you need that has the connect macro. Qt extensively uses macros and generates code so I suggest you use QtCreator unless you have advanced knowledge of building programs with Netbeans.
Joseph Young (6 years ago)
&app refers to the application which is why quit() can be used. You need to change that to label.
Eamon McCarron (6 years ago)
I don`t understand why my program won`t work, QApplication app(argc, argv); QLabel *label = new QLabel("I am a label!"); QPushButton *button = new QPushButton("I am a Button"); QObject::connect(button, SIGNAL(clicked()), &app, SLOT(label->show();)); button->show(); return app.exec(); } I did Show instead of quit();
Jc123 (1 year ago)
This is late but it looks like you have a semi colon in your SLOT Parameter
Bosoxgalaxy (6 years ago)
Help! I wrote the program exactly as he did, and all that popped up was a blank window.
Felipe Solís (6 years ago)
Thanks a lot for the simple explanaition on signals and slots, when I tried learning qt in the past it was the first wall I hit... now it makes sense.
Didrik Nidler (6 years ago)
Hello, I got a problem. It says mingvm10 missed, so i downloaded the DLL file and putted it in the directory. But then a new DLL miising. What to do? :(
bondfenix1000 (6 years ago)
how do i make this into an exe
tikonwar3 (6 years ago)
I don't think your using qt
OffWhitePanda (6 years ago)
Most likely a syntax error.
OffWhitePanda (6 years ago)
Been following your videos from Java to C++. You sir ARE a genius! Thanks for your contributions to the community!
Anon386632 (6 years ago)
the function quit being passed into the function SLOT which is being passed into the function called connect FUNCEPTION!!
THEGAMINGRULER (6 years ago)
actually I think the bool event makes the button a switch button for example you click the button to open a window and you click the button again to close it and click again to open and so on so it will switch between events if that is what it is than its extremely useful I almost used something like that in all of my projects
Jean Cédric Huet (6 years ago)
bool refers to boolean right ? which is true or false... but if it's clicked, then it's true. I don't see the need to have a different state to the function. Well, maybe I'll learn by the time.
THEGAMINGRULER (6 years ago)
the reason it has parenthesis is because clicked is actually a function and as far as different clicked state goes there is only one more and that is clicked (bool) which im not sure what it does
Jean Cédric Huet (6 years ago)
Why does clicked have parentheses ? Is there different clicked states ?
martmelee (6 years ago)
I'm ok with the "->", i just wonder if you can create objects instead of pointers in this example. i might just try it out.
Youssef KH (6 years ago)
oh Hello there :) epic moment
Miklós Németh (6 years ago)
if the "->" bothering you just simply type ".". QtCreator eplaces it to "->" :)
martmelee (6 years ago)
hey bucky, why all the widgets you add to the GUI are always pointers? can't we use simple objects?
Στεβεν (6 years ago)
Very very cool thanks man!
VirtualTicher (6 years ago)
This system it´s very easy that Java Events.
Nick Prat (6 years ago)
That makes no sense lol... A pointer points to something, if you have a pointer to an object, you still have an object, but you can only access it through a pointer. Also, if you allocate objects in the heap, you get a lot more space for it, try loading a 1080p picture into your stack... Program will crash
Gavan Singh (6 years ago)
oh hallo dare!

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.