Qt QML structured value types (introduced in Qt 6.5) enable developers to use raw C++ data structures directly in QML without pointer-based QObject wrappers, significantly improving performance for game development. This feature allows creating data models with value types that can be populated from JavaScript object literals, enabling efficient rendering of game entities through Qt's Model View Framework. The structured value approach eliminates the overhead of QObject-based property systems while maintaining the declarative nature of QML, making it ideal for performance-critical applications like games where thousands of entities need to be rendered efficiently.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
C++ | Briarthorn | Day 5 | Exploring QtAdded:
Hey, Jan. How's it going?
All right.
Where do I or how do I want to start doing this?
Um.
Ooh, this is out of date.
This might have to do this over.
Let me think.
Let me think. Let me think.
Well, I mean I guess if I am going to use the QT library, I should probably start with the latest and greatest compilers.
So to that I say die.
Let's go ahead and copy this and let's add it.
I plan to do everything with QT. So QT is kind of my bread and butter. It's what I am most experienced with. So, anything and everything that I could think to do, I can do with QT.
U and so we'll see what happens.
I'm still kind of getting the feel for what kind of coding I want to do, but I think QT at least puts me in my comfort zone. So, we'll see.
I'm at least going to try and uh get that same uh range ring setup I had going with Brierthornne up and running in QT, but I also might try and build a little chat application to talk with uh the Twitch API. Not sure about that. Um but I've had developers or people wanting to learn programming hop into this uh stream and ask like, "Hey, is your code open source? Can you can we look at it?"
And I can't really do that with the game I'm making. But what I can do is make the code that I use to make the game open source. So if I use something like QT, well then I can provide this entire project for other people to try out and play and code along, you know, that kind of thing.
Will I try QRI? I'm not 100% sure if I'll do that or not. Um, I guess if I needed to build my own rendering backend for the game, then I could do that. Or if I um I don't know if we if we want to make like a a toy simulation or something where we're trying to rent render hundreds of thousands of entities then we probably need to make use of QRI directly versus just using the the standard you know uh UI version of Qtqu.
We'll see how do you control the layout in QT and GTK. You can arrange widgets in a grid or a box. Yeah. So, uh, QTQU provides all kinds of layout widgets. Um, they do rows, columns, row layouts, column layouts, grid layouts, things like that.
So, I already have this branch. So, this is Awen. It exists in GitHub already, right? You guys have seen this for those who have been here. Um, I have a branch called QT. I don't know if you can see that. It might show up small on some displays, but I have a QT branch in GitHub right here. This is where all the QT stuff will currently sit.
If I get this up and running and then the pipelines passing and all that fun stuff, then I will probably merge it to main and just be done with it and say like, hey, we are now using QT.
Um, but I did already verify before I hopped on line today that this compiles for Windows. Uh, I don't think I've set up my stream to show the application for QT. So, let me get that up and running real quick.
Yeah, you guys aren't seeing this. Okay, one sec.
Um, Oh, wait. Do I already have one?
Does that work?
That doesn't work. I'm going to delete this one.
Why does this not work? This is the wrong application selected. There we go.
Uh that is hiding chat.
Okay, I also need to add this to vertical.
Something like this, I think. Okay, good enough for vertical.
I need to head out, my man. Long day tomorrow. Good luck. Thanks, Bo.
Thanks for stopping by, saying hi. I appreciate it. Have a good night.
Um, so this window that is currently rendering on the display, guys, the the white window with the black ring, you'll see that uh gap right there, right?
You'll see how like this cleanly resizes.
Now, this is debug, so you're still going to get some choppiness. Um, that's all C++ QT QML scripting.
And that is done in this main.qml file.
Now, this currently uses a a c a canvas item which allows you to do on paint.
And if you're not familiar with QML, it's it's a custom markup language for QTQU, but it also supports um if you're familiar with JavaScript, it also supports JavaScript, which you know, that's its own can of worms when it comes to uh programming.
I could give this a different background color so the text so the chat doesn't get like covered up like this. And that should be easy to do. I can just do color um cyan or if I want to give it a uh an alpha channel or an alpha color, I can do something like this. And then VC code lets me kind of select a color.
I think I want more.
Let's try that.
I'll build it.
Is it me or is my application window showing up with transparency in OBS?
What in the world?
Oh, what is this?
I I wish I could show you. Wait, I'm going to switch over to my desktop and see if you guys see this.
Yeah, you see the like I don't know what's going on here. This is the This is This is funny.
I wonder if it's That's so weird.
Oh, is it because I I gave it a transparency.
Oh, wait a minute. Wait. Why does it go to two?
274B.
Okay. Wait a minute. I did that wrong.
So, it's this. No, this.
And then this needs to be FF, right? Two. One, two, one, two, one, two.
I gave my window a transparency that I didn't mean to. That's funny.
I'm going to build that again. See what happens.
There we go.
Transparency gone. That's cool. So, I can give my window transparency. Totally meant to do that. Uh, I can give this ring a white color. Maybe make it a little bit thicker.
something like that, right? But anyway, while I'm doing that, I want to make sure this is up and running on Linux.
Um, I'm going to shrink this a little bit.
Actually, I'm going to close it so that vertical people can see what's going on.
Um, unless can I There you go, vertical people. You get it as a as a backdrop to uh the chat messages.
I'll cover up my window.
It's just going to show up small.
Actually, how how does that show up?
>> C R E A >> Yeah, I think Okay, that that works out for now. I just wanted to Oh.
Uh yeah, that works out. I like it.
Good enough. All right.
So, I need to get this uh Docker file stood up to support uh QT.
Might as well use the latest uh 2604.
Is that going to be an LTS?
I forget if the '04s is an LTS version or if it's just every two years, which makes sense, I guess, cuz 2404 was LTS.
So, this might be an LTS.
Uh, Open JDK I need for Android. USB utils I need for Android. That makes sense. Let's go ahead and update to GCC16. Might as well use the latest and greatest. I have no restrictions as to what compilers I can use or not use.
Um, I think we already discovered this doesn't work anymore because I'm updating. So, I need to do questing.
Questing is playing up to version 23 yet? Does anyone know?
Not really. Looks like they're still on 22. Okay, that's fine. 22 it is.
So, we'll stay on 22. Um, I do want Nah, I was going to do code coverage, but I don't want I don't know if I need that right now.
So, I could just make sure the shirt has it by default. I'll I'll add it.
Whatever. I don't even care. So, we'll add the LLVM tool chain or tool set.
Yeah, tool chain stuff because that'll give us access to um code coverage and whatnot. Let me I got to look that up. I don't remember exactly what the tools are. I think it's like LVM CV and LOVM proof data is what I That's I'm looking up uh in my GitLab right now for some older cmake scripts to figure out exactly what I need and that requires authentication.
Uh, I stall LVM. I'm pretty sure it's like let's see LVM CV.
Yeah, that and then this becomes LVM prof data. Yeah.
I mean, if that doesn't work, it'll yell at me. So, all right. So, now we need Linux graphics dependencies for SDL3, which is no longer true. We're going to need dependencies for QT.
So, I think the best way to go about doing this is probably remove these especially from here and then let the builds fail so I know what dependencies I actually need. But then I'm going to put them like up here because those are these dependencies are most likely to change more often. That way this stuff that doesn't change I don't have to rebuild every time I rebuild the container.
Uh, so we got our compilers GCC 16.
I think all of this is fine.
Plane 22.
I think that makes sense.
Do I even need this?
emulator runtime dependencies for Android makes sense. All this makes sense.
So, I'll start here. Let's get this built. How's the dev container looking?
I don't know if I need the privilege flag.
So, I'm going to get rid of that for now.
LVM code extension VS Clang D. We want CMake tools. We want GitHub. We want Git Graph. Actually, I think there's a new Git Graph. So, I might uh because the git graph I've been using, I didn't realize it was so out of date.
Uh or no, this was last updated a month ago.
Maybe I'm crazy. Neogit graph.
Last release a month ago.
The original git graph changed its license in 2019. Everything after commit is no longer MIT. This work is based on that last MIT commit. Oh, I don't think I knew that.
All right. Well, I'm going to leave this one alone then because I was reading last releases five years ago, but this says last updated a month ago. I was thinking this was out of date, but maybe it isn't out of date. All right. Never mind. So, I'll leave that alone.
Uh live server we want. And of course we want the pets.
Okay, I think that's good.
So I'm going to go ahead and close this.
And I think it's time to reopen this in a container.
Do I want to save the changes I made to do file? Yes.
Rebuild.
I'm sorry, Travis. I assuming you're still there. Uh, I'm not sure what question you're asking. Int how Completely missed that.
Looks like we're in the middle of installing the Android SDK for our pipeline or our uh Docker container.
You know what's going to be nice about QT, I think, is I won't have to manage my own Android configurations because I think it automatically handles that for you.
Web Assembly is going to be interesting.
I don't know if I've done QT with web assembly yet.
How's the uh how's the music levels?
All right. Audio test. This is me talking.
Perfect.
Perfect.
We have entered the container.
It's not picking up my CMake presets.
Don't know what's going on there.
There's no errors.
What the hilly?
I have CMake in the container.
I have CMake version 4.2.3.
I have V VC package.
Do I just need to reload the window?
There it is.
All right. Uh, what's a good default to start with? I guess GCC debug.
So, this should be using my custom VC package port overlays um, triplets for x64 Linux release. So, what this is going to do is I I had to make this custom for QT specifically because QT license is LGPL. And so, that usually means uh however you release your code, it has to be um you have to enable others using your code to be able to swap the binaries that uh you're linking against for LGPL code.
So basically I'm using my version of QT but I should be a able to enable I should be allowed to or God what am I trying to say? You should be allowed to bring your own version of QT to link with my code due to LGPL or I need to at least give you some kind of option to link object files. So if I were to link statically, I would still have to be able to provide you with the object files that I linked against for uh QT.
So what I'm doing is I'm going to build it dynamically if the port is QT, but otherwise the QT dependencies are going to be static. And the reason I do that is to make it easier to distribute the binaries in a um portable way.
Hey. Uh, hey Eckle. How's it going?
And at some point I'm expecting the QT dependencies to fail because I did not install any like OpenGL drivers or Vulcan drivers or anything like that with my container.
So, I wanted to give it a clean start so that I only pull in the stuff I need.
Yeah.
All right. We're 18 of 32.
Going fairly quickly all things considered, especially in a WSL environment.
Okay, here we go. We're going to probably start running into um missing dependencies. So, we're almost certainly going to need lib tool.
I'll just go ahead and copy this now.
Oh, and yeah, autocomp automake lib toolize.
Yep, it failed. That's to be expected.
So now in my docker file I will define a set of QT. Actually this isn't even QT specifically is it? Is it?
Um it's GPF GPF. Uh I don't need to be that granular. QT dependencies, dependencies.
All right. So now I rebuild the container. And if I did this right, the layers prior to that should not need to be rebuilt. It should just be the new layer that's getting built.
And yeah, now we're back in the container. That easy.
So I can come back in here, hit CMake configure again, and hopefully we get past this dependency and move on to the next one that's missing.
And that way I only get the bare minimum that I need to to try and keep my uh dev container as small as possible. Kind of hard to do when you're when you got the entirety of Android SDK and NDK.
Excuse me.
For my YouTube uh viewers, I appreciate you stopping by. I see you. Just so you know, I am live on Twitch as well. If that is your preferred viewing, I'm good either way. Just wanted to make sure you're aware because I forgot to add it to my title.
All right, that's promising.
installing font config so that we get uh font for our applications.
Oh, all right. We got our next round of errors.
So, let's figure out what dependencies we're missing.
Oh my gosh. Uh, let's see. Let's take a look at this file.
Uh, error. Clock skew detected. Oh no.
Um.
Oh man. Does that mean I got to rebuild the Let's see. Everything else is good.
Block skew detected.
All right. I am going to and hit rebuild container, which it shouldn't need to be rebuilt.
Now, I'm going to try and delete the cache for this project.
Um, what was that? Font config.
So, all my dependencies are getting built here. So, font config. I'm going to delete um downloads font config. I'm going to delete here.
Right, let's try this again. Configure.
Hey there. What am I making? Um, I am currently getting my project up and running with QT, QTQI, and QML.
Um that includes supporting you know Windows, Linux, Mac, Android, web, uh maybe iOS. Uh but once I get this up and running, I am planning to use it to port uh some GDAU code for a game that I made um and port it over to here and and kind of explore what QT would be capable of if I wanted to make a game with QT instead.
I might also as part of like because this repo is open source, I might also add like an open source project to it for maybe like a chat application with to interact with the the Twitch API.
We'll see how far I get with that. Uh but I am getting this clock skewed error.
So, I might have this guy help me out.
synchronize the container clock.
Thanks for stopping by. I really appreciate it.
I've already restarted the dev container. Resync the clock from an HTTP date header needs root resync clock with HTTP.
The container lacks capsis time. Docker drops it by default and the container shares the host clock. Anyway, two real options. Add sys time capability to the dev container so that date s works.
Then rebuild the container.
This is weird. I've not had this issue before.
Move VC packages build tree off the bind mount to a container local path. Want me to update your Oh, is that the issue?
Is that the issue?
I'm not opposed.
Yeah, because I I had to change where VC package dumps its build tree because on Windows Windows has a 256 character path limit. And so when you're dealing with a a a framework like QT that just has like massive amounts of nested source code, uh you end up with path lengths that are longer than 256 characters. And when that happens, Windows just kaputs. And there are like there are like uh registry settings that you can mess with to to potentially get the uh path character limit increased.
Um, I've done it in the past. I've had some success. I've also have had many failures with it. So, it's never been consistent for my taste. So, BC package does provide a way to move the build tree. I did that and now I think that is not playing nice with my Docker file.
Man, I'm getting the hiccups.
Verify everything's consistent. Clean up the existing skewed build All right. So, verify everything's consistent. Clean up the existing. The cleanup is still running. Large build tree on a bind mount is slow to delete.
All right, let's see what kind of damage was done here.
So on the Windows platform, we have VC package build trees Windows.
Okay. So, configure preset. It adds adds a VC package build trees. Windows parents from VC package.
This is only for Windows.
or Unix. Uh, not Windows. It sets the build tree to the home. folder.
I mean, I'm okay with it.
We'll give it a shot. See what it does.
I mean, it didn't update my other platforms though with There it is. Okay. It had to think about it.
Okay. So, VC package build trees Unix.
So, I don't like I don't think I like that naming convention.
Guess we'll try something like that.
See what happens.
I wonder if this will actually allow the dependencies to compile a little quicker since I'm not writing to a Windows disc.
I always make sure the dependencies are being configured correctly. Concurrent core. Yeah, I'm not including widgets or anything like that. That's good.
So, this now ends up in my Oh, this will be interesting.
So, I don't think this will persist, right?
So, this is where the the build files end up now.
Is that going to be a problem?
I don't know if that's going to be a problem or not.
Okay. Font config is the actual test here.
Uh which hasn't started building yet.
I think it's next. There's GPF.
How's it going? I'm doing good.
Just just trying to get my uh the the foundation stood up to develop QT QML applications. It's basically there, but I need to make sure it's working on uh on Linux and web as well.
I did verify it works on Windows already.
expat. Okay, I think font config might be next.
Nope, I lied. There it is. All right, now we're on font config. No ammies. No ammies. No amies. No amies.
Yeah. All right, that worked. Okay. So yeah, I just had some kind of time synchronization issue between my local Windows drive and um what the dev container was picking up.
26 of 32. We're almost there. The only problem is QT and QT base and QT declarative will take up the most compilation time.
And those are the ones that I need to figure out what dependencies I'm missing in my Docker file to ensure they compile. I know I'm going to need like the uh X, what is it? XKB libraries. Oh, here we go. Uh, yep.
We're on QT base now. Here we go. It's go time.
And it usually gives you the command needed to make sure you get everything.
They can be installed on YUbuntu systems via sudo aptgetit install um lib x cbdev.
Oh, I need all this. Uh so I'm almost certainly going to need these dependencies.
I'm pretty sure I've gotten the language server to work correctly now. I don't know why.
Maybe not.
Oh, I'm in the middle of configuring.
Yeah, no, it won't work yet.
Oh, hi T. What are you doing? Do you want to say hi to the stream? Huh?
What? What are you doing?
Oh, you're ridiculous cat. What are you doing?
He doesn't want to get up.
I use ES5. I not sure what that is if I am honest.
Or at least I have not heard of it before.
Oh man, this is going to take like at least 30 minutes to get through.
Should probably I'm going to like that should be good.
I don't know if that'll be enough. So, the other thing I can work on while I'm waiting for this is getting the uh GitHub action stood up again. So, I have Android L. Well, actually, they might be good.
Let me make sure.
Forgot that I might have already cleaned this up.
Oh, let's see. Dev container. Dev container.
Yeah. Okay. Yeah. This this needs to be updated. All right. So, I need this.
Paste this here.
Okay.
I don't think this is any different, but I'll copy and paste it just in case.
All right. So this is x64 clang arm Android release.
x64 Linux clang arm Android release. That looks the same.
But my guess is this doesn't change much if at all.
of I probably have to do something different there.
I think this changes.
So, I'll copy this.
Oh, um I mean we're on 2404 as the runner, but the container will be 2604, which should be fine.
All right, let's see what changed.
Okay. Yeah, that makes sense.
Yep, that makes sense. Okay, so We want this. We want the Docker file.
We want to remove all the old stuff.
I removed a new line.
Let's add it back. Oops.
Okay. Okay. So, I'm removing the platform name because Oh, because we're not using that anymore, right?
whole valley of plenty.
I think this stays the same.
Oh, I didn't even notice the uh the build was done.
All right, so we're going to get build failures like I expected.
Oh, that kind of sucks.
Now I can't control-click on the file path because it's not in my workspace.
I don't like this solution.
I don't like it.
Don't like it at all.
The only other thing I could possibly think to do.
All right.
So, before I make these changes then, um, I'm going to unstage this one.
Unstage.
Unstage.
I'm going to try and delete the uh Docker image completely and rebuild it a new. See if that solves the issue.
I'm going to commit these changes here.
Um, fix up GitHub workflows and dev container.
And then for these, let's stage them.
stash them.
This will be time sync picks.
So, if my idea doesn't work, then I guess I'll just put these back.
Oh, the unnecessary pain I go through just to be able to say I can build my project on all these platforms.
Not for any other real reason. Uh, okay.
So, let's I push these up.
All right. So, let's go back to Windows.
Let's uh hop into my WSL environment here.
And inside this wsl environment, I should be able to do like docker image ls, I think.
17 gigs.
of disc usage. Woo, that's a big container.
Um, actually don't know how to remove. I don't remember how to remove an image.
Is it just RM?
Did I literally Google RMI? That's what it is. Uh, Docker remove image.
Unable to delete images being used by running container.
delete all the containers. Oh my god.
I'm sure that was fine.
Pro I probably didn't need any of that.
probably.
I just reclaimed 131 gigs of space. Oh no.
What? What have I done?
Uh, that didn't stop the container though. How do you unable to delete. Must be forced. Image is being used by a stopped container. Oh my god, how do I force dash f? There we go.
All right, the container exists no more.
So, now we're going to start from a completely clean Docker build. And I'm really hoping I don't run into that stupid time sync issue.
And when I rebuild the container, this should also have the uh the QT dependencies.
Uh hopefully this includes like lib cursor, libx cursor. Dude, cat, what do you want? What are you doing? You've been like fed to the wazoo today.
All right. So, reopening container and we're going to watch some paint dry again. And for that, I apologize. See, I'm still getting this like option to rebuild, though.
I don't know what that's all about.
Oh, wait. The container didn't rebuild.
No index found.
Wait, why did the thought I deleted it?
All right. I don't trust this.
I did something wrong.
How do I Is it prune?
Docker purge all horse maybe.
Bruno.
I have no Docker images. So, how can I have a container running?
Okay, let's try this again.
There we go.
Jeez, what a pain. All right, I'm going to go see what my cat wants. Be right back.
Hey, where are you? Come on.
I need to get a camera set up or something for you guys so you can see what I have to deal with.
I walked him out of my room into my kitchen where I have food for him and the food was already there.
It was there. He just needed me to walk him to the food.
Ridiculous.
Ridiculous.
Okay, we're at 13 of 13. So, that's promising.
Wonder if I can get in the browser while I'm doing this.
Doesn't look like it.
All right, we got there. We are in the container once again. Hopefully without the time synchronization issues.
Okay, I'm going to hit configure, which should lead to av package folder being created, I hope.
Oh, it's starting with QT base. So, we won't run into that issue either way cuz it it's not going to rebuild it.
So, we're probably good there.
Where am I from? I'm uh I'm I'm in the USA.
Good old Midwest Midwestern United States where the where the green grass grows and the corn pops up in rows.
All right, cool. Okay, so while that builds, I think we'll just goof off and play uh Wordle real quick.
Wordle.
So, I don't want to just sit here and watch paint dry and have nothing to do, right?
Well, where do we even begin? Let's try maker.
Well, that went better than I thought it would. Let's try tough, dude. Cat, what is your deal? Hey, come here. Come here.
What?
I fed you. Oh, okay. You're just flopping and rolling on the ground now.
Oh, careful. Watch out.
Um, okay. So, we know we have a K and R and A rake. Rick kicker kick.
I want to see if I can get a C here.
Let's do like that doesn't work.
What else can I do here? Uh, I want to try and get a C. B W I can get uh W. Is this a word? Is Is wiki a word?
Wacky is a word.
Okay. Okay. That's kind of what I wanted to see. And it's not a C. Okay. So, we've got something A, something A, something K, something. This can't be an R.
No E at the end. I feel like this there needs to be a vow at the end here, but I don't have any vowels left other than a. I could reuse a.
Do any of these other letters potentially come after a K in a word? S.
It could be plural. We could be dealing with a plural word. Okay. So, if we're dealing with a plural word, now we're talking and when you have an R. So, oh, I did that wrong. S.
So we're looking at arcs.
A r k arcs s dark parks. Parks parks.
Boom. First try after the three tries. Oh, wait. I didn't get it. I thought I had it.
What are you doing?
How did I not get this? It's park park park.
Seriously, what? Parker Parker. So, it does end with a vowel and it is using an a parka. Wow, that's so dumb.
All right, you got me there, you stupid game.
All right, now let's make me feel really dumb.
Uh, looks like QT the core QT components are still compiling. So that's I mean it hasn't failed yet. So hopefully I've gotten all the dependencies I need. Uh let's see here.
Skip season leap stir bound play muddle coil repeat shore poor fountain certain shuffle garnish fated faded.
H like a leap of faith.
Faded leap of faith. I'm I'm not seeing that connection. Uh you can skip, you can leap, you can shuffle.
That's a dance, I guess. Shuffle.
bound skip leap bound shuffle maybe not even close I am terrible at this muddle the mixture uh pour garnish things you put on top certain sure it's like guaranteed It's faded. It's guaranteed to happen. It's faded to happen.
It's sure to happen. It's certain to happen.
Uh, it's shuffle to happen.
Skip, leap, stir, muddle, play. Bound, it's bound to happen.
Destined. All right. All right.
What else? What else?
Repeat season. Poor fountain.
Poor fountain.
Coil is like a spring.
I'll be back. My cat All right.
Still in the QT CMake configure process.
It looks like this one's going to take a minute and then QT declarative is going to take a minute and then I think we're done.
Oh, skip, play, repeat, and shuffle are all like music playing.
Cooking.
Stir. Garnish.
Season and pour one away. Yeah, I'm not sure about four.
You season, you garnish or maybe store.
Stir like you season on top, you garnish on top, pour on top.
Did that say I was one away? Garnish, stir, muddle, leap, leap, and coil.
Muddle. Mix it up. Stir it up.
Oh man, I don't know about this one. I was one away.
Season, garnish, stir, pour. I was one away.
Season, garnish, stir, pour.
That was one away. What could this be?
You You season on top of something. You gar you put garnish on top of something.
I'm almost wondering if stir was the wrong one and pour was correct.
Stir and muddle kind of work together.
Fountain is on top.
Yeah, that was dumb. That was so dumb.
Oh god, that was such a dumb guess. Uh, season garnish, stir.
I get one more shot at this.
I mean, this is just like cooking.
You think fountain? Wait, no. Didn't I just try fountain? I think I just tried fountain.
Um, muddle the mixture. Stir the mixture.
Pour the mixture.
What else would Muddle go into? Muddle would be like I'm almost wondering if these four, but I thought I thought I was one away with stir, garnish, and season, but now I don't remember.
You season, garnish, coil, and leap. Doesn't make sense.
Spring coil season season leap fountain coil. Do you think season leap fountain and coil season as in like the seasons of the year?
Leap year.
I don't I don't I don't got it. So, let's just hit it.
What spring might refer to?
I would not have connected spring and fountain.
I think I could have gotten I got to spring with a coil. I could have gotten there with leap season. Of course, I don't think I would have thought of spring and fountain in the same in the same thought. So then this one is muddle pour stir. So these three I had I made a connection with. But garnish maybe garnish means something more than I was think. Oh, it's specifically to make a mojito.
Ah, this game is dumb. Anyway, I don't think any of these are um free to play.
Yeah.
All right. Where are we at? Back to boring old paint watching. This takes forever. Okay. So, I think I think I can do this on my personal time. Um, but this does appear to be making progress by the fact that it didn't fail. So, what I'm actually going to do is I'm going to stop this build.
I'm going to pop this back open to Windows.
I'm going to commit the changes that I have and I can let GitHub run it in the background while I do some uh QML and C++ exploration.
Hello. How's it going?
Thanks for stopping by.
You've caught me uh working on a uh C++ QT project here that I'm trying to get up and running.
Uh except my changes aren't showing. Oh, cuz I already pushed my changes up. Duh.
Maybe they were already running this whole time. I don't think they were cuz I never created a pull request.
Let's get a pull request going.
Um, oh no, I might have to rebase.
Cannot automatically merge. Crap. Uh, I don't need to rebase. I think if if I want to use QT, then I think the real solution is I just keep this branch going and I nuke everything else and then rename this branch to main and say to H with it. I don't need to rebase.
So then the question becomes, can I get my oops, can I get my code to run in the pipelines without a pull request software LLC?
Let's create the poll request.
cuz then I can at least use this to get my pipelines up and running. Oh, is it really going to have me? This branch has conflicts must be resolved.
Gross.
Um, does GitHub have a way to just run your Oh, you know what it is? I think I've explicitly told it not to run my workflows unless it's a merge request off of Maine.
Only when I push to Maine or create a pull request on Maine do the pipelines run.
Okay, so let's I guess go ahead and rebase. This is going to be gross. I don't know about you guys, but if you've ever done like a git rebase, I'll do it visually.
That way, it's a little easier to follow along. Also, I just like clicking.
Um, so I need to get this QT branch to be as if it is coming off of the main branch. So, I'm on QT. I need to right click on origin, rebase current branch onto this commit.
Yes. And then we're gonna get a metric crap ton. Oh my god. Yeah, we're going to get a metric crap ton of merge conflicts.
Oh, actually, no, we're not. We got one merge conflict. So, we click on this to resolve.
resolve and merge editor. And we pick what we want to keep.
Um, I actually don't want to keep any of these, I don't think, because I don't need SDL or widget. So, I think I just ignore.
Too many changes were detected. Only the first 10,000 will be shown. Uhoh, I screwed up. Uh, we need to make sure get ignore has my There we go. Oh, and I also need to ignore the ini files.
got to ignore the autogenerated files uh which is a QT thing. So let's do QT uh QML language server.ini.
I think that's what it is.
Yes.
Um okay. So, we will continue the rebase. So, now it's going to go to the next commit and we're going to have errors. Oh, we got all kinds of errors.
But that's okay because most of these I think I'm just deleting.
So, it's going to ask me, I think. Uh, is it going to ask me? Wait a minute.
Why aren't you asking me?
Oh, because uh Okay, here we go.
Reserve. Uh, reserve. Resolve and merge.
Right. I think what happens if I stage these file was deleted by us and modified by them.
Delete the file. Delete the file.
Delete. Delete. Delete. Delete. Delete.
Wonder why it's struggling with this one.
Uh, let's except I don't think it really matters.
I'm going to be nuking all this anyway on this branch. So, I'm just going to pick one because it doesn't matter.
We'll continue the rebase. Uh, save all commit changes.
Then we're on to the next commit.
And we're going to have to keep deleting these, I think.
That's stage. That's fine.
Delete.
All right. What about this one? All right.
Here we go. Let's accept uh let's accept this one.
Oops.
stage.
Yes.
Continue. Save and commit.
All right, I think we're getting there.
We're almost there.
Uh, resolve again. None of this really matters.
Complete.
Continue.
Resolve. Let's take the left one. Complete. Continue.
Rinse and repeat.
Let's uh accept all incoming. Complete. Continue.
Oh boy.
I had a lot of commits on main since the last time I created this uh QT branch.
Let's take the left side. Complete.
Continue.
Oh, here we go. This I need to not screw up.
Actually, it looks like this doesn't matter right now. Um, it's definitely going to be the left side.
Complete. Continue.
Oh my god.
Oh, shoot. I screwed that up. Oh, this one crap. Crap.
Uh, okay. So, I need doesn't really matter because again I'm just deleting these.
I often make mistakes when committing. I forget a file that was part of a change or I don't test code before committing.
Bad practice. Oh yeah.
Yeah. If you're if you're if you're not uh if you're not organized in how you go about uh managing your commits, you can end up causing yourself a world of pain.
I This is funny. I actually uh uh remember as a professional here I was sharing an office with a co-orker and I was um I was in the middle of typing a bunch of code and um we have a Frisbee that we would throw around and it was called the Frisbee of failure. So anytime you made a mistake or anything like that, you get tossed the Frisbee. And I was uh my co-orker sitting behind me. So, I'm sitting here typing, writing code, and you can imagine, and it's like not not a small amount of code either. I want to see if I can find like something like this, right? Just just a file with a with a bunch of code. And so, I was sitting here typing. None of it was committed, right? Um, and I'm in the middle of a commit, so I've made changes. I haven't committed it yet, but I will eventually commit.
And I happen to hit control A, select all.
And right as I did that, the Frisbee of failure comes flying by my head. And would you know it, it hits the delete key on my keyboard and wiped out everything I was working on. Now, obviously, I was able to um recover this, but like I I couldn't like it was just like such a freak accident that happened.
Blew my mind.
Continue.
Uh, I think I want I don't want either of these. Ignore. Ignore. Complete.
Continue.
Oh my god. How many commits behind was I?
continue.
Oh, here we go. Okay, I'm I'm getting really close now. Uh because I will need to resolve this because I don't want I just want the QT stuff.
Um I need the right side.
So the right side should only have the QT dependencies. Oh yeah, complete merge for that.
Sometimes it's a sign from above. You're you're not wrong. Sometimes things are meant to meant to happen.
Uh I need the right side.
Um, definitely need the right side here.
What is it saying?
It's saying it's deleting it.
I'm going to have faith.
Oh, it didn't like that.
Um, can I just like delete this? You know what? That's what I'm going to do. I'm going to stop fighting this. I'm just going to delete these.
Delete.
That looks good. Okay.
Okay, that looks good.
Uh, I don't know what's going on here. Let's just hit continue to see what happened.
No, I didn't like that.
Oh, hello. Oh, did I make it to your for you page again? Heck yeah. Making progress.
Okay, I screwed something up or it's not liking that I deleted in the middle of a rebase.
weird. All right, continue.
Um, continue.
Okay. I need the left side.
Continue. We've got to be getting close.
Yeah, we're defin Yeah, we've got to be getting close.
Um, VC package. I think I just need the left side again.
Extensions.
I need the right side.
The gradal stuff I don't really care about because I'm nuking it.
left side.
Um, definitely want this. But why is it not thing? It's deleted.
Keep. Oh, I I didn't see the keep option.
ARM Android release. I feel like I need this as well. And I want the right side.
Keep.
Keep uh let's see if that's actually what happened. Uh what is that? That is my cm make triplets.
That looks good. That looks good. That looks good. Good.
Uh okay. All that looks good.
Continue. We Oh my gosh. We got to be close to being done rebasing because we are now looking at the Docker files I literally just edited today.
Uh, and we almost certainly just want one side.
Whichever one I'm using. Actually, it's going to be whichever one uses YUbuntu 26. Uh, the right side. There we go.
Uh, yep. That looks good.
Wait, why did that not Was there a complete button?
I miss it.
Said right side reset.
Why did that not Whatever. Uh, okay. So, dev container.
Oh, it didn't like that. Guess we're doing this one manual style. Uh, we definitely want to keep the VS Code pets.
Uh, and we also want the QTQML.
Uh, except incoming.
That looks good.
Yes. Continue.
Save and commit. Oh, I think we did it.
All right.
There are updates available for poll request. Okay.
So, we are now 25 behind and 63 ahead.
And what I'm about to do, avert your eyes. This is about to get gnarly.
I'm going to verify I'm on the correct branch. QT.
If I do a get branch- a uh we'll see something. Uh okay. So remotes origin QT looks good. All right. So we're just going to do a little get push-f. And everyone keep your eyes closed. And all right, now we're good.
So now I need to come in here and actually uh clean up anything else that uh yeah, I I deleted my main.cp. CPP for instance. That's a whoops.
Um awkward.
Okay. So, we have the main.cpp.
Um except I don't want to do it. I should be able to do it like this.
Oh, that's funny. That's not okay. So, this is the QML setup if you want to load your QML files at runtime versus compile time.
Uh, do I even have it configured to support it that way?
I don't know.
I forgot I have another copy of this.
Uh, just got to find it.
Okay.
Okay, I think that is good.
I got main.
I don't really need source right now.
So, I think I'm going to nuke this for now, but I do plan on I think one of the things I need to implement to for uh at least if I want to use QT for my game is gamepads using uh SDL.
So, I'll definitely be wanting to add like a source directory to start implementing like separate modules to support like adding game features to QML.
Uh, but because I don't need that right now, I can also remove this.
That might eliminate some of the issues.
I don't need the Android folder anymore because QT automatically handles all of that for me.
Uh, what else do I not need? I don't need this include folder for now. Uh, one downside to QT is I I will have to go back to using header files instead of C++ modules, but that's okay. Uh, assets. I don't need assets anymore. QT will give me the fonts I need.
Um, docker ignore. Do I need this?
I think I do.
Um, okay.
Let's uh stage all of these changes and then let's verify my application still builds.
It configures. That's good. Doesn't did not have to rebuild the QT dependencies.
That's good.
All right.
It compiled. That's good.
Now, did it install correctly? So that I can do dot /bu x64 msvc debug installed bin awen. Boom. And we should see a window on the screen again which tells me at least on Windows the rebase was successful.
Wait, can I say the rebase was successful if after the rebase I had to make all of these changes?
I'm not going to worry about it.
Remove unnecessary files and modules that are un modules Q2 implementation.
All right. So, we'll push this up all of this so that there are no merge conflicts so that I can now go to my website here, GitHub.
Look at that. Have you guys seen anything as beautiful as that? I added 300 lines of code and I removed 10,493.
That is beautiful software development in the making.
Okay, so it looks like it's going to be building the Docker container and then once it finishes building the Docker container, it will build the application.
Okay, so I got to remember how to use QML because it's been like two years.
And I also need to see if the uh language server and formatting works as expected. So if I hit control save, it should tab back over. Cool. But can I do like visible?
See, there should be like an auto like a popup that lets me know what uh properties are available. Let me try let me try this. So, let's do like text um anchors dot Oh, there we go. There we go. That's language server. Um I mean the AI is already autocompleted.
So, I I just center in the parent I guess.
Um text hello chat.
Uh, we need to give it a color white.
Give it a font dot pixel size. Sure, why not? Of I mean 24 seems reasonable.
Uh, does this have an alignment?
Alignment center vertical.
That doesn't seem like it's doing it right. Okay, there we go. All right.
So, I can build this. So right now the way this is set up I have to compile this into a uh main module so that main.cpp can load the module.
I can set this up to just literally load theqml file as an entry point and then it will run like that. So I might be able to get some hot reloading working in here. I know QT provides a tool for it. I have used it with the QT creator.
I have not had a lot of success getting it up and running with VS Code and VC package. But I'm hoping maybe with a little bit of LLM help we can get that figured out.
Uh because I have not I didn't have LLM back when I first tried to get this up and running. Uh let's run this again.
There we go. So now we got Hello Chat in the center of our screen even though you can hardly see it. There you go. If I stretch it out now, you can see it.
How's it going, Clement?
All right, cool. So, I did reply. I replied as soon as I got your message. Now, if there is a delay with the stream, I don't know how to fix it. I have tried.
I don't I just don't know how. I'm assuming you're coming from YouTube. For whatever reason, YouTube has a uh a delay with when I receive the messages and I don't at least through OBS. So, I don't know how to actually like um fix that because the delay isn't there for uh Twitch. I mean, there is still a delay, but it's not as like long.
So, hopefully that delay isn't causing uh people to leave because I'm not responding to them.
All right.
Cool. Pretty smooth. I wonder how much uh I'm going to look real quick at how big this application is for a basic build of it. Debug's going to be small or actually debug's going to be bigger.
So in debug my application is 147 kilobytes but a lot of it is DLS which are a lot bigger. Uh I wonder what a release build actually I have not tested the release build.
Let's do a release build real quick.
How's it going Chris G?
I I've noticed I've I'm getting uh a number of uh Indian viewers which is pretty cool. A lot of I mean your your population is pretty large so I assume there is a good portion of you who are into uh software development engineering.
Okay. So that built. Let's see if this will install.
Looks like it did.
So, let's do a release run.
Heck yeah, we got release.
I mean, I'm just drawing a line, so there's not a lot to see.
Uh, let's see. Dev Awin, build release install bin.
It's only 36 kilobytes in release. Okay, so this is much smaller properties.
Still about 50 megabytes total. It's kind of big.
What are we doing today?
We are looking at QT and QTQU using QML, which is what you see on the screen.
I want to build a an application, potentially a game.
Um, it is not showing up on my screen now. So, is it only the debug one that shows up?
I'm going to have to figure that out.
Uh, but I want to turn this potentially into a uh an aircraft top down aircraft shooter game. I already have something running in GDAU. Uh, not fully flushed out or anything like that, but I want to port it over to something I am more familiar with, which is QT. I'm finding I'm leaning over a lot. Maybe I should just lift my mic up. There we go. That way I don't have to lean.
Uh, I won't be able to guide too much.
you're you're welcome to follow along and if you have any general C++ questions I can give you some knowledge on I would be happy to but I I'm not uh currently I'm not doing any kind of like tutorial work.
This project is open source on my GitHub though.
I think I have links on YouTube and Twitch.
Uh I don't know if I have any links in the Discord. Maybe I should add some to Discord. Not sure.
Um, all right. So, with that up and running, I still want to keep an eye on the GitHub builds.
Oh, they already failed. They already failed. Oh, on Mac. That's fair. I have not tested this on Mac yet.
That is perfectly fine to fail on Mac.
It looks like it can't find Ninja for some reason.
Oh, or uh I haven't updated the uh the Mac uh workflow to support automake, autocomp, all that fun stuff.
Um, yeah, I'm actually surprised.
Yeah, I definitely Okay. Yeah. So, I need to update the uh the workflow here to get all the dependencies that QT needs to install. That's fine. I'll do that later. I'll do that on my own time.
I also don't think canvas is the way to go here for drawing um for what I want to do.
I I guess it could be, but I think canvas is more like HTML rendering provides a 2D canvas item enabling drawing via JavaScript.
So, it allows drawing of straight and curved lines, simple and complex shapes, graphs, and reference graphic images. It can also add text, color, shadow, gradient patterns, and do low-level pixel operation. Dang, this thing can do a lot.
The canvas output may be saved as an image file or serialized to a URL. H rendering to the canvas is done using the context 2D object, usually as a result of paint. to define a canvas uh threading threaded rendering and render target pixel operations in general large canvases frequent updates and animation should be avoided with the canvasimage render target this is because with accelerated graphic APIs each update will lead to a texture upload also if possible prefer quick painted item and implement drawing in C++ via Q painter instead of the more expensive and likely less performing JavaScript script and context 2D approach. Okay.
I mean, if it's good enough, gosh, I got to remember how to even It's been so long since I've done QML.
But the idea is I want a I need like a data model and I need I need a shape. I think that's what I start with.
So, if I create a new I'm just uh I'm going to call this model entity.qml.
I need a entity.qml.
I need shape.qml.
And I want to add these. So A B C D entity model entity shape.qml.
Oh, and I'm also going to need a uh a view entity.qml.
Okay. So we'll save that. F7 to build.
It may or may not like that. Actually, it doesn't like it.
Okay.
So, oh man, how did I do data types in QML?
I think it it's a uh it's a Q object. Is that what I did?
QT object.
QT object. That's what I did.
So that would create a QT object with a property name. We give it a position, XY position. We don't really need anything else. Um, position, rotation, property, reel, uh, rotation, uh, except we'd call it like heading.
Is that all I need? Position in 2D space, orientation.
I think that's good enough for now. Now, the downside here is this is an this is a pointer under the hood. And if I want to do data, it would be it would be better if it wasn't a pointer.
Now, without having to write custom C++, I'm curious if um QML has a way to support this.
QML data object nonpointer in QML working with a non-pointer data object usually refers to using value types also known as gadgets that's right that you have to like create so you can create your data strct define it as a gadget and then you might need to create like a um a function that you expose as like a singleton in order to instantiate your data because I think Q gadgets still get access to the property system which is huge compilation uh comparison pointer versus non-pointer by value managed by C++ scope.
Now the question is can I create a data model with a gadget Q gadget data model because I I know there's a new model they add oh it's right here range model so QT added a new type which I which came after I stopped using QT professionally and I was upset because I basically uh used to have to roll my own imple implementation of this stuff before it did that. So we can create a strct as our data type in C++ Q range model.
I need to know how this works like as a QML. What is buddy?
The range that the model was constructed from is not accessed and only destroyed if the model was constructed from a movedin range.
What?
I've never seen the word buddy before used in APIs.
Q range model can make the data in any sequentially iterable C++ type available in the model view framework. Ooh, this sounds amazing. This makes it easy to display existing data structures in the QT widgets and Qquick item views and to allow the user of the application to manipulate the data using a graphical user interface. Oh, this could be huge.
Look at this. So, I can just literally use raw data, plug it into this range model.
How do I go back? I want to go back.
Dang it.
Uh, okay. plug it into this range model and then set it to a view.
But can I do it in QML?
Once the model has been constructed, passed to a view, the range that the model operates on no longer be modified directly. Views on the model wouldn't be informed about the changes and structural changes are likely Oh, is it only for constant data?
For ranges that are const which access always yields constant values APIs are not available.
Q range model implements right access APIs to do nothing and return false in the example using array. Oh, this might not be as good as I thought.
not an example in QML.
Using QT gadgets or objects is more convenient and can be more flexible than implementing the tpple protocol. Those types are also directly accessible from within QML. However, the access through the property system comes with some runtime overhead. Of course, for performance critical models, consider implementing the TPPLE protocol for compile time generation of access code.
The TPPLE protocol.
All right. Uh, let's open up another tab. Can I do that from here? Console logs. Add element to chat. New tab.
Q range model in QML.
Okay. So, I'd have to expose it myself.
Crap.
I mean, that could still work, I guess.
Oh, what is this?
What's cooking in QT6.11, which I'm not on by the way. I'm on QT 6.10 uh because it hasn't been integrated with VC package yet.
QT611 has just been released and to celebrate the Jesper once again met with Mon Stambboroski from the QT group to discuss what's new. Here are some highlights from the many topics discussed. Custom drawing in QTqu is way better with Q canvas painter. That could be promising especially if that's like improving what the uh canvas layer or canvas item I was looking at earlier.
Using Q range model adapter makes it much easier to access underlying data when using Q- range model.
The new task tree, how to use it, how to get started with it, what to expect in 6.12. Oh, it's an entire video.
So, it doesn't actually go over the features. Uh oh, we have blog post though.
Uh QT task tree. What is a task tree?
Are we talking like a to-do list?
Oh, is it like processing? The task tree shows how to construct a nested task tree recipe using timeout tasks.
So it's a visual element for managing multiple processes whether sequential or in parallel. It looks like that's cool. Don't know if I have a use case for it right now, but there are definitely use cases for it, especially if you're doing anything with like a lot of ser uh services.
Uh fetch my template library KD algorithms Q canvas painter. This one looked interesting.
What are you doing, cat? Why are you back here? didn't already take care of you.
Introducing QT agentic development skills and tools. Uh oh.
Accelerated 2D canvas benchmarks. New canvas rendering features.
Look at this.
I want to see what the differences are.
Lenovo ThinkPad. Lenovo tab. Is that a tablet, I assume? Yeah, that's a tablet.
Accelerated 2D canvas results. Here we go. So, what did it used to be and what is it now?
What are what are these numbers here?
The testing was done so that the amount of rendering count is increased. 1248 rendering count 12481632 and then measuring how this affects the average FPS. Initially the rendering performance is capped by the screen update frequency until increasing the rendering times causes missing the frames. Here are the benchmark results.
So they did this with OpenGL anti-alisting DirectX 11 and 12.
Um, I mean, yeah, looks like significantly higher values. I don't know what it means by rendering count.
That makes it sound like it's not rendering a lot, but I know that's not true, but it looks promising.
Cool. All right. And then what about the features itself?
How do I 2D rendering introducing cute QD canvas painter canvas rendering features with the new canvas rendering module. The canvas painter we have the ambition to create the best modern C++ painting API achievable. This blog post goes through some of the new innovative canvas rendering features brings to QT users.
Before reading this post, please check the previous one introducing the QT canvas painter. After understanding the basics of what the painter is, you can proceed here to get details of the new canvas rendering features. Yeah, I'm kind of doing this backwards.
Canvas rendering highlights, adjustable anti-aliasing, box gradient, shadows, grid patterns, custom shader brush, color effects, adjustable anti-aliasing.
So, I wonder if this means we'll be able to uh do all the rendering in QML instead of C++ if we choose to adjustable anti-aliasing.
Interesting.
Text anti-aliasing. Glow effects on the text.
Box gradient.
Round wreck verse box gradient.
So, will this be better than just the QML item itself?
I think that's one of the issues with that prevents QT from being like a performant use of making a game is when you start rendering a bunch of items, it gets slow really quick.
That's a cool effect. Grid patterns.
Oh, that's cool. I actually need a grid for my game.
See, this is making me think it's all still C++, though. Custom shader brush, wiggly text, color effects.
Okay. All right. That's all. Canvas features tasty range model adapter.
Okay. Okay, so none of this is actually so it looks like the Q range model is still kind of a C++ implementation that I then need to expose, but it also makes it seem like it's read only. So I don't know if this gets me what I need.
Uh 611 item access specializes template for the type used in your data structure and implement read.
Oh, you add specializations in order to implement uh read and write without inheritance.
Interesting.
So maybe it isn't just read only. It's read only by default, but maybe you can add stuff to be able to modify it.
So I got to think about that. But in the meantime, uh QML QT object verse what? How else would I do an object first?
Oh my god, it's been so long. I am out of practice. Um because I don't think I want to use a pointer. I think I need to implement it as a Q gadget in C++.
Create a function that instantiates an entity.
create a data model that um what do I have to do? Create a data model that accepts the gadgets as input.
So that basically means I can probably start creating that entity uh module now.
Gosh, I don't remember how I did this.
Oh, I don't remember how I did this.
I don't think C++ modules work well with QT. I think there's a way to do it. I just don't remember what it is.
I thought there was a way. QT add QML module. I thought there was a way I had to add Source code sources. Yeah, that's what I thought.
Sources.
Um, sources.
I don't know if that is needed.
Um link against core click make this public we will make awin entity uh yeah we'll link against this um first and I think I have to to do something here like imports or something like that. QML files import path uh imports except do I do that here?
I won't touch it for now. Well, we're just gonna we're gonna do this live.
Um Oh my gosh, I just don't remember.
I need a source file.
I need a way. Okay, so I do need a singleton or QT so that I can like instantiate the types from my module. So that means this guy needs like a win entity dot which means I need what do I need? How do I want to do this?
because I'm expecting in like I don't know you're going to have like a property called entities except here it's going to be like awin entity.create create something like that.
Oh, and this will be import.
What would it take to use a data strruct like entity within a QML file?
I'm aware gadget exists.
Do I need to implement a singleton to allow for entity instantiation i.e. Owen dot Owen entity I can just dot right entity dot create entity inside.
Is there a way to define an entity in QML like entity uh x0 y z heading zero Pure count QML component. Yeah. Your existing entity already supports the declarative syntax. Just important app.
Yeah. Yeah. Yeah. But that's a pointer.
No C++ required. Limitation is that the logic is QML JavaScript only. Q object with QML element. Idiomatic declarative.
Yep. Again, it's a pointer.
Pure QML singleton that again is a pointer.
C++ singleton more control.
Can't help but notice it's still a pointer.
What?
What did it do with my gadget example?
All of these solutions use pointers.
I want to use the data itself.
No pointers, which is why I was going the Q gadget route.
The only downside is I think I don't get access to setting a property this way.
So it becomes harder to know like what the parameters are you're passing in for Q gadget QML value type lowercase name.
Yep. Yep. All that makes sense. All that makes sense.
Oh, I can do it this way.
Holy [ __ ] that would be huge. All right, I'll be right back. This is huge. I might be able to make use of this. Oh man, I'm going to use the There.
This is promising.
Okay. So I think that means I can just do create this I link against it.
So this becomes pragma once include uh Q I don't remember where the uh the QT gadget definition is. Is it like Q gadget Q?
Dang it.
So out of practice.
Do I just include Q object and call it a day?
Looks like it.
Okay.
Why is it auto changing?
That's so dumb.
Missing in zoomed.
Hey there. How's it going, Taylor?
Um, okay. So, we'll guess we'll just see what happens.
I'm assuming there's going to be all kinds of compile errors. Oh, yeah. All kinds.
mainly because I'm using Okay, let's uh let's disable these Hello, Addity. How's it going?
You streamed for a while, never had one viewer. Yeah, it's it's tough. I you know, I I don't have any insight into it. I'm just trying to do my thing, and if people show up, they show up. If not, I'm still going to do my thing.
It's also really hard to like be entertaining when you're just sitting there watching a code compile, you know.
And right now I am in the zone.
The danger zone entity target is QML module with target path on an entity. It uses an output directory of source entity which should end in the same target path but doesn't.
tooling such as QML will may not work directly. That's right. So, I gota I got to figure out a naming convention here.
Oh, I think respect game and see doing spec driven with antigravity flutter dart mobile flutter and dart heck yeah that's what I like to hear I have a uh a flutter mobile app myself that I've been working on I'm actually kind of a fan of um of Dart and Flutter and how easy it is to get to get a crossplatform application up and running. Of all the languages and frameworks I've used, it's probably like bar none the easiest and quickest to get something up and running.
Okay, it is supposed to be lowercase, so I don't know what I'm doing wrong. What are you doing, cat?
Am I not linking against I wonder I shouldn't have to because I think quick pulls it in.
I was just missing a header file.
two mini games within a game. Dude, I can't even make one game.
You've made two. That's That's insane.
All right. So now the next test here is can I get this piece to work except I think it's going to be lowercase now right almond.
made it.
So then it becomes like property bar entity.
No, it's going to be like name entity. Let's just try this.
Is that right?
That's not right.
What am I doing wrong?
Maybe the LLM lied to me. Uh, they're wrapping it in parenthesis.
Uh you're welcome to hop in uh or join my Discord and and post uh any projects you're working on. I can always look at them later. I don't I'm not going to be able to do it right now.
Uh request text document formatting failed. Go to output.
Okay.
entity.
Let's see. Name.
So, it hasn't found this yet, but I think that's okay because I think here I have to tell it it exists. Imports awin. Let's try that.
Not looking good. Not looking good.
So, I think I need to find a way.
Oh, man. This is going to be It's been a minute. I'm gonna have to figure out a way to get my my own plugins installed at this level.
So in this installed, I need an AWIN folder followed by entity which will be my imports.
And I'll be damned if I remember how to do that. Um, in fact, I wonder if I need.
Uh, I might be missing my install step.
Generate, deploy QML. Uh, I might be missing this. Uh, uh, am I though? This might just be for the application.
Oh, I don't remember. I really don't remember.
Can you look at my source directory for allen slash entity?
I need a solution for installing the QML module into my CMake install prefix next to the apps bin directory.
I recall being able to do I recall doing this with QTCMake APIs before, but I don't remember how.
We'll see if it will uh tell me Maybe it's maybe it's just additional options on QT add module.
I also need to get it to work with like this build directory cuz it needs to show up as source awin.
Oh, there's nothing here.
Uh it's a header file. That's why I didn't really build anything. Well, that's not true because it should have autogenerated. There should have been mock. Wait, am I not building for debug?
That's a rookie mistake. I thought I was building for debug. I was looking in the wrong directory.
Okay, so there is an awin directory.
There is an entity directory.
There is QML types. There is my awin entity plugin.
Um, but the awin entity Oh, did I not make it a DL? Oh crap. Am I still building my project as static?
Uh, that's going to cause problems for a plug-in based um software like QT.
Where do where do I do that? preset compiler.
Is it here?
Whoopsie.
All right. Uh, well, let's see what the LLM's saying. It's struggling. Okay.
Fair, I guess.
Uh, this needs to be true.
True.
All the truths everything true. All right, let's try this again.
Uh, it's a header file, so I shouldn't need an export macro.
for now.
This guy is really thinking about it.
I think he's telling I think it's figuring out that I just need to do it right.
He's secondguing whether QML dur is even a valid parameter for Okay, I'm going to stop you right there. I think I need to get this built as a DLL first and then we'll see if uh I remember how to do this.
Um, okay. So, let's go back to debug because that's what I thought I was using.
Configure Uh, I'm going to I'm I am going to most likely make a game using QT, QML, C++.
Uh right now what I'm doing is I'm trying to remember how to use this uh framework and API so I can get some thoughts going in my head about how I want to lay out the architecture. So let me switch over to my desktop real quick.
I have a game in GDAU that I've started to make, right? And it's called Brierthorn.
It's going to be an RPG rog light most likely topdown like aircraft shooter type of game where I can like select who I'm firing at there. Oh, there's a bad guy there.
Right. So, you're going to have to lean on your radar to figure out how who's out there, how to deal with them, what their capabilities are. um you know, defeat your enemies, collect resources, upgrade items, so on so forth, all that fun like rogike type of stuff. You can zoom in and out to see how far away things actually are, how close they are to you. So, we're in like the range of kilometers. This guy's 20 km away. So, he should be trying to get behind me.
And I'm going to slow my aircraft down.
So, I'm I am using a controller to do this, right? So I can I can turn so on so forth. I'm gonna left trigger to slow down the air bra.
So this guy is starting to approach me.
This is like the the this would be like level one, right? Oh, and here comes the giant laser beam. He's Oh, and I dodged it. Right.
He's trying to line up his shot on me.
And boom. Right. So I don't I don't have a lot here yet, but I have some stuff enough to get an idea of how I want to implement this. So this is in GDAU.
I've got some problems with GDAU that I'm not a huge fan of. Uh nothing that wouldn't actually prevent me from getting this game done, but more because I just don't feel like it. Um, I am more comfortable with C++, QT, QML that I think once I get a couple of core components in like the controller support, I can probably get the game up and running again much quicker and I'll be able to iterate on it and improve it and add features quicker with a framework I am more comfortable with and familiar with because my game isn't going to do anything like too crazy. I don't think that I would need all the features that GDAU gives.
So that's kind of that's kind of what I'm working towards. And on top of that, I want from like a streaming perspective and providing C++ guidance and sharing my knowledge, I want a uh framework that I can give to the community as open-source that they can either follow along, play with, uh ask questions, you know, that kind of thing.
while also keeping the proprietary uh game portion of my application to myself so that I could potentially sell it down the road. Uh that's where my head is currently at. Subject to change because I am whimsical and I don't stick to one project.
And then I also like to, you know, I like I like I said, I have my mobile app on Flutter. Uh, I've streamed it a couple of times, but this was before I started to blow up a little bit. Uh, and I don't know how how much interest there is in seeing like Dark Flutter since a lot of my audience is coming from my C++ videos. Um, and then I also like to stream video games periodically as just kind of like let's take a break. I work 40 hours a day every or 40 hours a week every every day. And um sometimes you just need a mental break, right? You don't want to burn yourself out. And so the we take mental mental rest or game nights. And so I'll stream a video game. I'm thinking it's going to be Thursday nights. Uh I already streamed Boulders's Gate Enhanced Edition last Thursday. I'm probably going to keep that going because uh I've never beaten it and it seems really interesting to me. I'm very familiar with the game. I've just never actually beaten the story. Um, and so I want to see that through and streaming gives me an excuse to actually play the game through all the way. And if people happen to stop by and say hi and and want to know what's going on in this story, the better. If not, not a big deal. Either way, I get to complete the game and take a break. Taking a break is very important.
And right now I am just trying to figure out how to organize this project so that everything works seamless seamlessly without having to struggle on figuring out how to like get my module I just created to be found.
And part of that is making sure, wait, why did that not that not configure? Uh, making sure my project is getting built as a DL and not a static library since QT is plug-in based.
Honestly, that's kind of an added bonus with QT as well is if you are a C++ developer or if you just want to use QML, it would be cool if I can provide like mod support for my game.
Uh, okay. So, that built in debug. So, the question is, do I have a DLL?
in this folder.
I do uh I don't uh but that that might be okay.
That might be happening because I don't I didn't specify.
Oh man, I just wish I remembered how I did this.
I think part of the problem is I'm just using a header file here.
Unless I need to specify shared I mean, it is getting built as a shared plugin. Now, the issue is I don't think I don't remember if that needs to go there or not. So, we're going to do what I didn't have back in the day and have the LM look at my implementation. See if anything needs to be patched up.
Uh, what is this saying? This is saying warnings occurred. Failed to import awin.
Can you review my source on entity implementation along with the inclusion in appwin?
I am getting a language server error that I would like to resolve.
I suspect the Aen.entity entity module isn't is either installed uh is either in the wrong location or a QML dur wasn't correctly specified.
See what happens there.
Yeah, hobbyist opportunity. Yeah. So, I'm I am a uh I'm a C++ developer by trade. So, I've like I've worked for companies that that that have released products, right? I I know the process. I know I have managed my own teams. I have managed repositories for the teams. Like I know I know what it takes to at least for a developer team to be able to work on a project and keep it well-maintained versus just being a toy project.
So like that's a lot that's where a lot of my experience lies.
But I have not personally have ever released a product myself and I would like to do that at some point.
And that's kind of why I started streaming was if I'm just going to spend my free time working on software projects, maybe some people would be interested to stop by and and see how things are going, you know?
And I also use that as an excuse to practice, right? Because when I'm working professionally, I don't always have the opportunity to work with like the latest compilers, the latest tool chains. Sometimes you're just stuck using whatever the company forces you to use or stuck writing code a certain way that the company requires you to write and you want to go out and explore different ways of writing code. That's also part of why I do this.
Uh the [ __ ] files were regenerated. The type trait failure is unrelated. Done.
Summary add set QML output directory.
CMake binary to the root CMake list right before existing.
After reconfigure build, every module emits its QML dur under QML onin entity and the autogenerated.
Is that what I was missing?
Where is that? uh in the lose mind you mind. Okay, so it think I think it's going to take all the modules with QT add QML module and dump them into this directory. So let's try that.
And if that's the case, it should become a lot easier to install these.
Let's see. Compile.
Howdy. Howdy.
Okay, so now I should see a QML dur.
Oh, hell yes.
Oh, that's promising.
Uh, that's not as promising. That doesn't look right. Uh, unused. Oh, that is so much more promising. Okay, now we're getting somewhere. Um, so I should be able to instead do var, I should be able to do entity.
cannot assign binding of type. Let me put this all in one line, I guess.
Dang it. Stop that. Why is it not like this?
Did the LLM lie to me?
cannot assign binding of type Q variant map to Awin entity incompatible type crap.
Yeah, I don't know. Um I don't know what to do about that. I don't know if that's like an OBS setting or what. And are you coming from Oh, wait. I just realized I'm on the wrong screen.
I'm not a noob. You're a noob. Um, yeah.
I don't know what to do about that. I YouTube is a lot more delayed. Maybe that's where you're coming from. Are you coming from YouTube? Yeah, you're coming from YouTube. Um, I don't know how to fix that. Uh, hang on.
YouTube delay when streaming from OBS.
It's probably just going to tell me how to do it. To reduce YouTube streaming delay, typically 20 to 30 seconds in OBS, change YouTube stream settings from normal to low latency or ultra low latency in the YouTube live control room. Oh, standby.
There is a control room, I think, in the YouTube website.
Uh, and I totally know where to go for this.
Caused by YouTube servers, not OBS, though. Okay. Uh, go to YouTube Studio, which I did.
We're going to make this stream better one step at a time, just like you do software development. You don't have to solve it all at once. You just solve it one step at a time.
Okay. So, I need to go to the live YouTube studio. Go to the live control room in the settings. Uh-huh.
I know where that is.
Settings. Here we go.
Um, under stream latency, I have general channel Upload defaults permissions. No, this isn't it. I I need to go to the Is it the live control room? Where the heck is the live control room?
This is the live control room.
Oh, it's like a minute delay. Jeez. Oh, stream settings. Wait a minute. Wait a minute. Wait a minute.
Uh, stream latency is set to normal. Oh, okay. Okay. So, lesson learned. I I see the option, but I don't I don't I can't change it right now. I think that's because I'm actually streaming. So, I got to figure out how to set it to like low latency or whatever by default and have it stay there.
So, for those who have been watching on YouTube, I appreciate you uh accepting the delay graciously and uh not not hollering at me. And uh uh Dr. Lobinshots, I appreciate you hollering at me and and forcing me to actually figure this out.
Uh hopefully next time I will uh get that figured out.
Um, but if you want lower latency, you can hop over to Twitch.
You'll get a little bit of music.
Uh, okay.
So, I need to figure out the LLM probably lied to me. It's probably not going to let me get away with doing it like this, which doesn't surprise me.
Unless I have to do it like this.
Can I Okay, I'm gonna set this to ask a question in main.QML.
I am trying to initialize my value type entity using object or uh try and initialize my value type entity.
I don't have a custom function written to initialize it.
Do I need one or is there another way to do this?
I was really hoping I could do it this way, but maybe I can't. I know. Um, back when I used to do this, I was always writing custom initialized functions in C++, but I was really thinking there was a new way to do this.
No, you don't need a custom function. as of 6.5 plus lets you populate a gadget from a JavaScript object literal, but you have two syntax mistake. Well, okay.
You caught me when I was in the middle of debugging, you jerk.
Uh, that's fair. So, I wasn't really using 6.5. I think when I was doing this, it was 63 or 64.
I mean, does it look like C++ to you?
Let's see here. Uh, oh, maybe I have to specify all of the variables. Maybe that's what I'm doing wrong.
Uh heading I mean it compiled. Maybe it's just a a QML language server error.
I guess I could try and run it. Um, how do I do this? I forget. There's a way.
Is it on started?
Component on completed. There we go. Component on completed.
Console log. Let's try this.
This is for debug, I think.
There we go. Okay, so that actually does look like that works. And the issue is the language server, the language server is calling this out.
Oh, you're coming from my YouTube shorts. That's fair. Yeah, you're you've uh you've joined me at a time of uh minor transition. I'm using QT and QML, which under the hood is C++. And I am going to be writing some modules for it in C++. And I have started out strong with a strct. Pretty cool, huh?
But yes, this this there will be C++.
All right.
But I got to get my foundation stood up because I want I want this project available for anyone else to play with if they so choose because I have had people come by and ask.
So this works. The language server is crying about it. So, is there something I can do to fix this? It's Oh, the QML lint is crying about it. So, I wonder if there's a um I wonder if there's a way.
I'm going to ask that worked but I am getting an error from QML lint stating.
Is this an actual issue or is there a way to tell the llinter to ignore this?
Yeah, because I I definitely was not able to do this back in the day. So, this is awesome. If I can get away with doing this QML structured value. Oh, it's a real QML lint limitation, not a runtime bug. The engine accepts Qvariant gadget conversion at runtime, but QML lint refuses it unless the gadget opts in as a structured value type.
I've not heard of this before.
This new QML structured value since 6.5. Go figure. That's probably why I've not heard of this.
Marks the surrounding value type as structured. Structured value types can and will preferably be constructed property by property from a JavaScript object. A structured value type however is always QML constructible too. This means you can still provide invocable constructors in order to handle construction from primitive types. You can declare a structured value as follows.
You can also construct list of values this way. Oh hell yes.
Oh, this is going to be so cool. Wait, no games allowed. Why no games?
Oh, sorry. That's just an example. Okay, we're good. Uh, okay. So, it turns out there is a new way of doing stuff that I wasn't aware of and I am learning.
This is why we practice.
So, QML structured value, is that what it was?
QML integrations.h H.
Do I need to include this as its own thing just in case? I probably Well, no. I include the header here.
Come on, please.
QML structured value.
This is so freaking cool.
Might not seem cool to you guys. It's simple, but it's cool to me. I've spent years working with this stuff, and it was such a pain. And the fact that there's all these quality of life improvements coming up is huge.
All right, so and that prints correctly.
Oh, hell yes. Uh, can I just print the type now?
I sure can. It even has my name space.
Look at that.
Who needs a GDOS script when you got QML and C++?
Okay, so that's promising because that now means I can use raw data instead of pointers for my game objects. So that's good. That'll make performance a little better.
Now the real trick is if I can do a list of entities.
Then I can turn this into effectively my data model and then create a view to render the tracks.
I don't know what I was expecting. I didn't print any of this out.
Um, that's awkward.
Entities. I also need to um make this so I don't have to keep compiling for QML and just load it at runtime.
There we go.
Okay, so it's finding the data. That's huge. So then what I can do is let's get rid of let's get rid of the text. I can now create a repeater.
Oh, I mean, if the if the AI is going to autocomplete it, I might as well just let it autocomplete, you know.
Uh, pass in entities as a model. Does it like that? Unqualified access entities is a member of a parent element. You can qualify the access with an ID.
Whatever uh window.
Okay. So I can do window dot what's this yelling at me about unqualified access as well. I don't know what to do about that. Is that the repeater ID repeater?
No.
Set pragma component behavior bound in order to use IDs from outer components and nested components.
Well, if that's not what I'm supposed to do, what am I supposed to do here? Is it just parent unqualified access?
Uh, there used to be a way to do this.
Um, is it like property entity model data?
Oh, is that what it is?
That doesn't seem right either.
Thought it was like this. It's like you do a required property required property model data.
Okay. So, we're going to do a rectangle.
We're going to give it a rotation. Uh, I guess they're going to be red for now.
Uh, height width of 10. That's not going to be good enough. Let's do 64x 64. They all have their own position, their own heading.
Uh, wait, doesn't changing the size of the item?
I don't need to do this. What I can do instead is anchors.fill fill parent and then scale the the parent item.
And if this works, that means this was the right solution.
Oh, I'm so freaking good at this. Let's go.
I mean, it's practically a game now, right?
Too easy.
This is so cool. So, I can just use a list of entities. So, I just need to define data.
Use this to render the data.
I am going to need to implement a way to update, right? Get a physics step going, but that's fine. That's easy to do.
Implement gamepad. So, if I implement a physics step and implement a gamepad, I basically have everything I was using from GDAU. And then it's I could probably just copy and paste a bunch of the logic and I could even implement the game logic in C++ at this point and it'll be really easy to do. GDAU was kind of a pain using GD extensions. It was still possible. I had it. Um just QT is you know older and and paid for for all the development over the years. So it's a little more well refined from an API perspective.
Is it? It's 3:40.
Uh, what else did I want to try real quick? Okay, so the last thing I think I'm going to try for this stream is hot reloading.
I uh struggled to get it up and running back in the day because one the tool was in its early like development and two I just couldn't get it to work unless I was using QT creator. I am hoping maybe with the help of the LLM uh figure out how to use the uh QML previewer that should come with these builds now from VC package uh tools QT6 bin.
Oh, look at this. There's Android deploy.
God, these are all new. Android deploy.
There should be like a Windows deploy.
QML preview. So there's this QML preview.exe.
This should be capable of loading the QML file directly without me needing to compile.
What else do we have here? QML time testr runner JavaScript root gen import scanner. Oh, there's that's something else I wanted to try.
QML should support uh autogenerating your your QML files and turning them into C++ files.
Uh what was that?
I'm getting distracted. But I I just realized I wanted to try this too.
QT I think it's a flag in this. And I the last time I tried this I think it was still like being tested. It wasn't like it was experimental.
Uh, type compiler. Enable type compiler.
I think that's what I need. Enable. If a QML module has QML files, you can compile them to C++ using QMLTC. Unlike bite code compilation, which is what it does by default, you have to explicitly enable QMLTC via enable type compiler argument. In which case, QML files specified under QML files uh property would be compiled. Files ending with.js. JS and MJS are ignored as QMLTC does not compile JavaScript code. Additionally, files marked with QTQML skip type compiler source file properties are also skipped.
By default, QMLTC creates lowercase.h and CPP files for a given QML file. For example, fu.qml ends up being compiled into fu.h and CPP. The created C++ files are placed into a dedicated uh subdirectory of your binary directory.
These files are then automatically added to the target sources and compiled as QT C++ code along with other source files.
While processing these files, the following source file properties are respected.
I mean, if it's as easy as turning on a flag and you immediately get the benefit of C++ code instead of bite code, kind of cool.
Is it that easy? It used to not be this easy. So, I just do this.
What do we think? First try.
I have my doubts. I have my doubts.
Um, I mean it configured.
Uh, let's see if it generated anything before I build.
If I was Oh, wait. It told me where it goes, right? It was like that.QMLTC folder.
I'm not really seeing anything.
Well, I mean it it's doing something.
I just don't think it I'm Oh, wait. Maybe it gets generated during the compilation step. Hang on.
Let me build it.
All right. So, what are we dealing with here? Entity was not found. Did you add all imports and dependencies? Uh, okay.
So, the type compiler isn't finding NC was not found. Did you add all imports?
Oh, wait. I wonder if I have to add uh I shouldn't have to add it as depends, right?
There's imports, dependencies, imports provide a list of other QML modules that this module imports. Each module listed here will be added as an import entry in the generated dur file.
If a QML file imports this module, it also imports all modules listed under the imports. Occasionally, a version can be specified by appending it after a slash.
This isn't quite what I'm looking for.
Uh, dependencies provide a list of other QML modules that this module depends on but doesn't necessarily import. It would typically be used for dependencies that only exist at the C++ level.
I see. I don't think that's my issue.
to the LLM debug away.
Uh, but before I do that, I'm going to stage my changes that I like.
We definitely need that.
We definitely need that actually.
Yeah, we want that.
Think we want all of these.
Uh, definitely want that. That, and we definitely want this.
Okay, debug. Go.
I'm sure there's something I'm doing wrong, and I just don't know what it is.
Maybe I have to enable the type compiler for uh entity as Oh.
Um I I so I I've never heard of Colossal Squid so I don't know but QML is is essentially a scripting language u along with the combination of JavaScript. It's uh it's called ECMA script which is what JavaScript is based off of. Um and so it allows you to do declarative uh scripting. So basically anything you assign to a value is like bound to it.
And anytime a value that is assigned to it is is changed then the value changes with it. So instead of like assigning 200 here uh you see my window has a width of 1280.
Well if I did window times uh 0.1 you know 10% of the width of the window anytime that width value changes the size of this entity changes with it.
And so you don't have to have like a bunch of um logic that you have to manually write to update these values.
It just does it for you automatically.
Of course, there's trade-offs. There's downsides to this, but the idea here is to make it quick and easy uh to get like UI and other stuff up and running. Um there are other ways to update your values if you don't want to do the binding route, but this is one of those ways. And you don't have to convert it to C++. You can just load the QML files during runtime or uh what QT does is compile these QML files into bite code and then you load the bite code during runtime.
I am trying out the C++ compilation of it because I've never used it before and I'm curious.
Well, I apologize. I missed your joke.
Yes, QT is a complicated beast. I have had my head in it for years and as you're wa as you are witnessing, I am still learning new stuff about it. Um, it is it is really good at making applications. It's also really complicated. Well, it's implementation is really complicated.
Uh what am I doing? What am I doing? Uh okay, so what did this say?
QML type compiler cannot resolve the entity value type that lives in a separate module. Two things conspire here. Type compiler has weaker import resolution than the runtime engine.
The type compiler has long-standing limitations compiling QML value types.
Option to fix. Drop the type compiler. I mean, yeah.
Move entity into the same module as main. That's nonsense.
Promote entity from a value type to a Q object if you Oh, this sucks. patch the type compiler's import path.
Oh, so is that what that might be? The actual issue is the type compiler during compilation step just doesn't know where the modules are being built at. So, we can definitely try this. I'm hoping that's all it takes. I definitely don't like the other suggested solutions.
Oh [ __ ] Did that screw I think that screwed other stuff up.
Oh, wait a minute.
Okay. So, that configured.
Guess let's try.
Nah. All right. I tried. This might be something I'll play with on my own. We don't need the type compiler right now.
Uh, okay. So, hot reloading. That's the next thing I want to try and figure out.
And if I can I will uh you know does actually I'm curious if the QT extension like lets you point to it. Uh, preview preview, live preview, QT restart, QT check, create a file, register, report an issue, reset.
Because really what I want to do is be able to like right click on this file and preview.
Yeah, we're trying we're trying out QT now.
And we we made a little bit of progress.
Check this out.
Booyah.
I'm sure that ring looks familiar to you, right?
And I've created a couple of entities that I'm rendering with a square.
significantly less typing than writing it by uh hand via C++. Uh but I am um a little rusty on my QMLs and QTisms. So I am trying to remember how to do all of this and I thought there was a way to do a QML preview.
Let's see. Debug QT.
Nope, that's not it. VC package.
uh tools QT6 bin QML preview. So I'm going to copy this path and I'm just I think I'm just going to try and run it on the uh ter or run it in the terminal.
Yeah, Cole Music isn't uh isn't wrong. I am I am perusing hella docs and and using LLMs and asking it questions like, "Hey, help help me out. My brain is rusty.
Um I already forgot what I was doing."
Okay, so we have this QML preview executable, which is there actually speaking of docs.
Nope, that's not how you do it. Browser QML preview verbose help. Uh, let's see. Executable the path of the executable file that loads a QML document.
Oh.
Oh, I have to enable QML debugging.
So, I need to make sure target compile definitions QTQML debug is enabled. Uh there's a way to do this where I can make it enabled whenever I'm doing a debug build and disabled when I'm doing a release build because QTQML debugging opens up ports which you don't want to do when like you're going to release uh like in production.
Uh but I don't remember off top of my head how to do that again. It's like target compile uh was it definitions or options?
Definitions. Okay. Okay, so we're basically defining a macro.
No keywords. What?
Uh, QTQML debug. QTQML debug. But we can do like generator expressions in CMake that will let us only specify this if our build type is debug.
Oh god, it's like Oh, thank God. I was really hoping the LLM would auto show up an autocomplete for me and it did not let me down.
So yeah, if our config type is debug, now I don't know if that actually works on other platforms.
Yeah, the QML sandbox extension looked really promising back in the day. Um, I think I tried it once, but I don't think it's being maintained.
I can look again and see if like someone else's picked up the mantle.
Last release two years ago. I don't know if it's like still being updated. I don't know. I've just recently learned I've been reading this last released as the last time it was updated, but I don't know if that's actually true.
I I think update is something else.
Is there a GitHub page to this? Maybe I can look up the GitHub page repository right here.
So, uh, oh, it did have a change last month, but nothing else has been touched in like years.
And QT has changed a lot.
So, yeah, I don't know about that one.
Um, where was I? I was doing this. Okay, so I configured it. Let's see. It built.
Don't know why it built because I thought I hit configure, not build. Uh, no, I did hit build. Okay, so now if I run my application, just to verify, I should see some uh debug or like ports being opened.
Yep. I don't know if you guys can see this.
QML debugging is enabled. Only use this in a safe environment. Do we have a safe environment here today, chat?
We're all safe here, right?
No one hack my computer, please. At least while I'm debugging.
Um, okay. So that is up and running. So that was step one. Step two is QML preview says you just pass in the executable.
The path of the executable file that loads a QML document. So I'm curious if this is what I'm actually doing. And maybe that's what I've been getting wrong all these years.
I'm not loading a QML file. I am loading a module. So maybe I need to change this to loading a file for this to work. And I will use an LLM to ask that question.
All right.
So here is the QML previewer executable and I need to pass in my um my own executable.
Oh [ __ ] Holy [ __ ] Wait a minute. Wait a minute.
If this works, then what should happen is I can add a text that I will well okay if the LLM is going to do it for me. Uh I can center it in my parent give it the text Owen.
Now we're going to do hello chat chat jippity. Uh pixel size 48. Ah, let's make it big. 64 and hit save.
There's also a QT live preview.
Um, I'm also curious if uh if that one's being supported.
I prefer to use the uh the extensions that come from the company itself if possible. Uh QML QML preview previewer uh four months ago. Oo.
Oh, web assembly.
Use QT6 Web Assembly preview QML file.
Package npx vsc. That is not quite what I'm looking for.
Okay, this is okay because again I think the issue might be that I'm loading a module and not the QML file. So, let me try let me try and load the file itself because I totally remember how to do that.
I totally remember how to do that.
It's like engine.load.
Oh, I mean I mean if it's if it's going to do it for me.
But see even this.
Oh, you know what? Wait a minute. Wait a minute. Wait a minute. Wait a minute. I modified the file in my source directory. I didn't modify the file that was installed.
So, let me let me verify that.
Uh, installed Awen Ben. Is there a mainQML file in here? Crap. No, because it's getting compiled in.
Um, yeah, because there's no Yeah, it's getting compiled in. All right. So, yeah, I think I have to load it from the file, but I don't know.
I don't know if that's going to work.
All right. Well, before I do this, I am curious to see if the LLM can get this one right for me. So, when I run this command, I'm going to copy it.
Uh when I run this and then I modify.
I was expecting to see a change appear in the application but it doesn't.
I suspect I am either modifying the wrong file or because the application uh the AWIN application and installation doesn't support loading the main.qml file from file.
It's not picking up the change.
Can you take H I don't even think I need to add any extra commands.
Hey, Peter, I am currently just playing around uh relearning how to use QML uh using an LLM to ask it questions and debug some problems for me.
Eventually, I would like to use QML and QT C++ to make a game. and all the components I need to make that game. I will uh hopefully generically add it to this project and leave it open source for anyone else who's curious to play around and see how uh someone like me with a lot of C++ and CMake experience manages a repository.
There's always the risk of uh leaving it open to the internet to be flamed.
Uh you're right on both accounts. And there's a third issue. Oh, see it's calling me dumb without even saying it.
What's happening? Your app loads QML from a compiled in resource, not from disk. So, we kind of we kind of knew that already. QML preview doesn't autodiscocover which file to watch. It needs the QML files explicitly on the command line. Oh, I didn't think I knew.
Wait, do you guys see anywhere in the QML preview, the official QT QML preview documentation says anything about needing the QML file on the command line as well?
the path of the executable file that loads a QML document.
Okay, so QML preview doesn't autodiscocover which file to watch. It launches your.exe with the QML debug server enabled. It then pushes the contents of the files you tell it to watch into the engine, intercepting the engine's file loads, including QRC, blah blah blah. with no file argument. It has nothing to push and nothing reloads. The file has to map to what the engine actually loads. Since the engine loads main from an onwin app module, QML preview needs to be pointed at the matching source file so it can substitute it for the resource.
The fix is to pass the QML file as an additional argument.
Now editing and saving main.qml should trigger a live reload in the running window.
I don't know if that a couple of related notes. The installed exe under build installed bin Owen is produced by install. So it won't pick up the new C++ changes until you rebuild install. But Cumlo hot reload via the debug service bypasses that which is the whole point. If you also want to liveit additional files when you reenable entity etc. pass each of them into the QML preview command line too. Make sure you actually run the debug build. Okay. So if this is true then eventually what I'll need to do is create like a small script or something that I can autoload all these QML files.
Uh, so it's saying I just need to pass in the main.QML file. It's not even saying I need to load the file even though it says I am right on both accounts. And there's a third issue. So I'm wondering if I need to do so I'm going to try just passing in the main file first. My suspicion is I wonder if I need my executable to load this file and or if I need to pass this file in as an argument to my executable.
So step one is let's just try I know this works because if you use the uh QT creator IDE it literally lets you like I don't know rightclick on the QML file or you go into like debug options and then preview it will work. So there's clearly a way to do this. It's just like QT's documentation doesn't really tell you how to set all that up or at least I I don't know how to do it or I'm or I'm misunderstanding what it's telling me. Uh let me clear this.
So it's saying I need to do something like dot slash app awen main Okay. So, that doesn't work. So, I need Let's try and load it as a file.
Uh, and I wonder like I don't even think the QRC thing works because the QRC prefix is also referencing the compiled bite code because that's how QT reference like you can compile all your QML files into your binaries and that's how this QRC thing works. So I think I literally have to load the file itself.
I think I can do this and just do Q URL.
Oh, come on. q URL from local file.
I don't really need this.
Is it under the read more? Oh, no. Was there something else?
No. No. Uh, so QT's uh documentation website, this more function, this button always just jumps you down to the description, which is what I had already read.
when you when using QM blah blah blah.
Yeah, I think you're right. I think it's I absolutely have to load it from disk.
Um, which is how I used to do it. This whole load from module thing is something uh newer that I didn't realize at the time that I could do.
Um, okay. So, let's just verify this works as is.
Okay. So, that works. Cool.
So, now let's try the previewer again.
I've got hot reloading. Let's freaking go.
So awesome. So what this means now I will say it is a little annoying that when you like save it relaunches the application. So I guess that is technically a hot reloading right? It reloads the application. I was hoping more like I don't know for you Flutter developers out there the window stays put and you just make a change and it automatically shows the change.
That might be something I can custom implement using a file watcher um down the road down the road. But this is better than nothing, you know, especially when you're just trying to do like rapid prototype and you want to sketch some ideas out and you want to like get something up and running and see how it looks and then when you're ready to finalize it, you can go back and compile it in. This is awesome.
This is awesome.
Holy crap. And I don't need QT Creator to do it. I get to use VS Code or any editor, right? because all of these tools come from GitHub from QT's open- source projects. So, you don't need QT Creator. Now, if you're just trying to get something up and running, it's probably easier to use QT Creator, but this is awesome.
So then the next step for me and I I'll I'll have to do this later. Uh maybe next stream I'll do this um is I want to get all of this like that command set up the whole uh uh option to load a file or whatever. Like I'll basically turn it into the debug build. So for our debug build, we will set it up this way. You know, I'll probably make this a parameter where you can pass in a file, that kind of thing. Um, but for the debug build, we'll load it this way. And then for the release build, the product release, we can do it the module way where it's all compiled in. Uh, more performant that way. And then for debug, we get to do rapid prototyping and stuff like that.
Oh, that's a good idea, Rafa.
Ooh, structure. So the top level window stays fixed and only a child component gets reloaded.
Oo yeah, I'll uh we'll have to explore that next time. That that's a good idea. I like that. I like that a lot because you you might be right that I think that'll work. But yeah, so C++ QML uh I will I'm hoping before let's see tomorrow is Monday.
Uh I mean I work all day so we'll see what kind of time I get but my my goal is to get the uh software pipelines running. So right now Oh my gosh, I'm hitting all the wrong buttons.
I actually haven't looked at this in a sec, so I don't know what the state of the compilation is.
Oh, look at that. It's a sea of red. It is a massive sea of red. Uh not all the the Docker the the dev container the Docker uh image built. So, that's good.
Um, so I have all the dependencies I need, but my goal is to turn this green for all platforms, Windows, Linux, Mac, Android, uh, and Web Assembly. Web Assembly, uh, I don't know if I've ever gotten QT up and running in Web Assembly before, so we'll have to see how long that takes. But, I want to get all that working. Now that I know hot reloading can work, I want to set up like a I don't know if it's going to be a debug build or if it's going to be a specific hot reload build. Um I I'll have to think about that.
And then we'll get all that set in place and then I think that's it. I think it's ready to hit the ground running and I'll start porting all of my GDO code over to an application um which will still be a separate repo but I will set this repo awin up with QT. I will set this up where uh you can use essentially use vc package to specify like awin as an option and it will like use vc package to automatically go out to my repo pull it down build it for debug and release. Uh we still got a lot of work to get that up and running. Uh but I think that's how I want to do that because then for my application my game all I have to do is go into my VC package JSON file and instead of specifying all this uh voodoo I just specify awin and I will get everything right. So a lot of work to do a lot of foundational work to do to get this up and running and make it like work nice. Um but man this is exciting.
This is so exciting.
all. And then at the end of the day, once all of this is up and running and I'm able to start making a game, I can then give up on making the game because it's too hard and I don't know how to make a game. Right? And then we rinse and repeat. That's how that's how you uh that's how you do software development, right? You always start the project over. You always get new ideas. You always try again. Now, I'm hoping I'm actually hoping I can use this to make real progress. So, we'll see. All right.
I think that is a good stopping point.
I've been doing this for four and a half hours today, which is a lot longer than I normally do it, but I really wanted to get this up and running. Uh, thank you guys for who helped out and gave me some of the suggestions to help me get unstuck because that was useful. I definitely want to try out your idea, Rafa. Um, but yeah, uh, I should be on tomorrow around 5:30 Eastern unless something in happens in real life. Uh, but otherwise, yeah, that's where I'll be. Thank you guys. I really appreciate you stopping
Related Videos
Re: 🗣️📍theprophedu📍2026 GST 103 CLASS (E-EXAM REVISION)
theprophedu
636 views•2026-06-04
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Instagram accounts got PWNed
EricParker
13K views•2026-06-03
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
So What's Odin Lang Even Good For
TechOverTea
131 views•2026-06-01











