Creating an instant messaging client
In the following section, we will proceed to create our instant messaging client, which the users will be using to send and receive messages.
Designing the user interface
In this section, we will learn how to design the user interface for the instant messaging client and create functionality for it:
- First, create another Qt project by going to
File|New File or Project. Then selectQt Widget Applicationunder theApplicationcategory. - After the project has been created, open up
mainwindow.uiand drag aLine EditandText Browserto the window canvas. Then, select the central widget and click theLay Out Verticallybutton, located on the widget bar above, to apply the vertical layout effect to the widgets:

- After that, place a
Horizontal Layoutat the bottom and put theLine Editinto the layout. Then, pull aPush Buttonfrom the widget box into theHorizontal Layoutand name it assendButton; we also set its label asSend, like this:

- Once you're finished, drag...