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 Application
under theApplication
category. - After the project has been created, open up
mainwindow.ui
and drag aLine Edit
andText Browser
to the window canvas. Then, select the central widget and click theLay Out Vertically
button, located on the widget bar above, to apply the vertical layout effect to the widgets:

- After that, place a
Horizontal Layout
at the bottom and put theLine Edit
into the layout. Then, pull aPush Button
from the widget box into theHorizontal Layout
and name it assendButton
; we also set its label asSend
, like this:

- Once you're finished, drag...