 Hey everybody, this is Brian and welcome to the 16th Qt tutorial with C++ and GUI programming. Today we're going to be covering the Q-line edit control. You've already worked with buttons, so we're going to actually use a button here. You know what a button is, and we're going to put this little guy to work here, and we'll say, you know, once again, click me. And we want the line edit control, which is a text box if you're coming from the C sharp visual basic world, or even in some cases Java, and let's just position those around a little bit. And if you're kind of wondering, you know, if your form is looking something like this, how you can clean that up, just right click your dialogue, go to layout, and then just choose a layout that's appropriate. For example, you can choose the layout horizontally, and you'll notice how your icon changes. And that way this will always be laid out, and it'll auto size itself too. I recommend you go back and watch the layout tutorials. I think it was a tutorial eight, horizontal and vertical layouts. Very simple to understand. All right, let's focus on the line edit here. Notice how it's got some properties. For example, text. It's got like a max length, things like that. Max length is so you don't get a buffer overflow of somebody who doesn't try to put a bajillion characters in here, and crash your program, and make it do something that shouldn't echo mode normal. You can set like password, et cetera, stuff like that. You know, when you type in a password, you get the little dots. We're just going to leave that at normal. And let's actually work with this. So right click the button, go to slot, and we're just going to create the click slot. And we're going to say UI, oops, line edit, because that's the name of the control. And we're going to say set text. And you just add the text in here. And let's run this. Let me take a second to compile my computers doing five other things. And notice how you can type in there. And when you click the button, remember a conversation about signals and slots. Ta-da, changes to hello world. So that is the line edit in a nutshell. One thing you might be wondering is how do you get the text out of here? Well, very simply, you can also say, you know what the queue message box is. So we'll use one of those. And we'll say information. You've seen this before. Shouldn't be anything too overly alien to you. And let's say, and we're just going to get the UI line edit dot text. There we go. So when we click the button, sorry, it's going to set the text. And then we're going to pop open a message box with the text. Let's run this. And you can see, there you go. Now let's comment this out. And we're going to flip back in here. I want to show you the password echo. Echo mode, set this to password. Save it. And let's go back in here. Just remember, you've got to comment this out right here for this to really work in this tutorial. Otherwise, you might get some funky results here. Let's run this. And just type a few characters. That would be your password. And just say, click me. And there's the character issue type. So we could say, my cat is bad. So no, that's not my real password. But I'm not going to type my password. You'll have to guess. But this is Brian. I hope you found this video educational and entertaining. And thank you for watching.