 Hey everybody, this is Brian and we're continuing our conversation of the QtreeWidget. Sorry, I have to split this up into a couple of different videos because YouTube likes to make videos small. So if you haven't watched Qt 21 QtreeWidget, go watch it because we're using the exact same code. And just to show you, let's run this. And there's our Hello World with our items. And notice how in the other tutorial we didn't add any functionality to the click me button. That's what we're going to do this tutorial. So just go to slot and then you can say UI, true widget and you guessed it, current item. And let's say set background color. And notice how you can do the column. We'll say column zero, we're going to say Qt red and let's actually save your work, run it. Maybe if this thing ever compiles, I think I got a virus scan going in the background. All right. So when you select an item and click me, you notice how it does that now. Obviously I made a boo boo. Let's go back to our code here. That should be one. Pile that again. This thing should work this time. Sorry about that. There we go. So you can control the cells individually. It's very important that you understand the concept when working with the QtreeWidget with columns and rows. See that selection going across? That's a row. I'm going up and down our columns. It allows you to take tabular data, column data, and collapse it. That's a feature you don't see in a lot of frameworks. But Qt gives it to you at no cost. Now one thing we haven't covered is how to actually set the column headers. I mean, it would be nice instead of just zero one where you could actually show some text up there. So the way you set those header labels is very, very simple. Let's actually do this up in the very beginning of this here. That's how we got our setColumnCount2. What we're going to do is say UiTreeLidget. And then we're going to say set. You can do them individually through setHeaderLabel. We're just going to do that. Say callA and let's run this. You notice how it says callA now instead of one? And each time you call that, it'll do the next one, the next one, the next one. Somewhat easier way is if you say UiTreeLidget, setHeaderLables, and notice the plural labels. And this one takes a Q string list. So we'll say Q, QStringList, we're just going to make one. And then you can just input those in there. We'll say one. Very simple, very easy to work with. Call and run it. And if everything goes according to plan, you now have your headers. That's it for the TreeView. Feel free to shoot me any questions you got. I've been fairly busy with work and kid and girlfriend and all that, but I'll try to get you emails in a timely fashion. This is Brian. Thank you for watching. I hope you found this video educational and entertaining. And stay tuned.