 Okay, I'm going to level with you. I did not want to make this section. I didn't want to make this section because it's a bit more advanced than what this course was really meant to cover. But inevitably somebody out there is going to say, hey, how do I connect C++ to QML? Can you explain that? And then we have a very long, exhaustive conversation. So I thought I would just add this section, which is going to go over the high level of how C++ and QML can integrate. So some disclaimers. QML lives on top of C++ and Qt. You can expose C++ classes to QML and vice versa. However, C++ is an advanced topic and we will not be covering it in this course. It's actually a prerequisite for this course to already know C++ and Qt Core. So if you're one of those folks going, I don't know C++, but I want to connect QML and C++ together, I would highly advise you to stop, go learn C++ and Qt Core and come back. Alright, C++ and QML communicate via signals and slots. If you already know Qt and Qt Core, you know exactly what that means. But yes, it means that all the goodness you've learned in Qt Core, you can actually use in QML. Everything under the hood is a signal and slot. There's no extra technology you have to learn. It's actually building upon what Qt is already built on. It's actually really cool. So we're going to open the main CPP file and we're going to explain what's going on. I've already dumped a lot of comments in here and I'm just going to walk you through it. So here are the includes and it's pretty standard for any application. But we have the QGui application, the QQML application. Notice the double Qs. That kind of drives me a little bonkers. But the QQML application engine, this is what actually loads all the QML scenes. So again, disclaimer, C++ advanced topic, QML lives on top of C++. This is the main entry point of the application. Notice I said the application. This is actually a C++ application loading a QML file. So in effect, you are making a C++ app. You just have a nice QML GUI. All right, the Qt Core application, we're going to set the attributes and we're going to basically say enable high DPI scaling. High DPI scaling is for devices, for example, cell phones, Chromebooks, things of that nature where you have high DPI visual displays. The application class, the QGui application, this is your actual app. And you can see down here, this is the event loop. So basically, we create the app, we do some configuration, and then we go into an event loop, meaning the application just runs and runs. So let me demonstrate that. So as soon as you see this window, bang, everything's loaded and now we're in the app loop. We're just waiting for the user to close the app and then it would come right here. So everything in between, we call this configuration, but actually for QML, this is the heart of your application. The QQML application engine, this is the actual engine that loads the script up and makes everything function. It loads it up using a, you guessed it, QStringLiteral, QResourceContent, main QML, meaning it basically just loads a string, this guy, out of the resource file into the engine and then runs it as QML. So in effect, it acts almost like a virtual hypervisor, if you will, or a sandbox loading the QML on top of Qt. Then we're just connecting some signals and slots and we're basically saying, hey, make sure that the object and the URL equals the object URL. A little bit confusing, but basically what they're doing here is they're saying make sure the engine loaded this correctly and if it didn't, then hey, exit with status negative one, meaning something bad happened. Very, very into this, we're going to say engine, go ahead and load the URL. If there's a problem loading that, you guessed it, signals and slots are going to kick in, it's going to say QQOR application exit negative one. So if you ever go to run and app and it goes like that and then immediately just disappears, check your app output, make sure nothing blew up and check the app exit status. If it's negative one, you know you've got some sort of problem. What's up, everybody? This is Brian. I hope you enjoyed this video. It's part of a larger series out on udemy.com called QML for Beginners. The QML for Beginners course assumes you know absolutely zero QML. You're just starting off and it's designed specifically for Q5. I will rerecord the entire series when Qt6 comes out and just know that it's over 100 videos and 13 and a half hours of video on demand. I'll put a link below so you can get a highly discounted rate and before you dive in, just understand it covers a lot more than what I can put into this list. Everything from what's QML to animations to C++, integration, JavaScript and on and on and on. But one of the requirements up front is you have to know QQOR. You should have some C++ under your belt and be very familiar with Q5. In case you have none of that, I do have some courses for QQOR Beginners, intermediate and advanced out on udemy as well. Hope to see you there.