About Qt Documentation

GUI material found from Plussa merele scratches the surface about all the things that Qt provides for supporting GUI programming.

In some weekly exercises and in the project you most probably need to find further information from Qt Documentation. For example, all C++ classes of Qt can be found from the link.

Qt classes begin with Q. Some C++ classes have Qt correspondences. For example, you will need to use QString class instead of earlier-used string class, since some methods require QString object as their parameter or return such.

Qt classes have hierarchical relationships, meaning that a class can have another class as its base class or as its subclass. A method can be defined (and implemented) in the base class, but it is inherited in the subclasses, and you can use it in the same way, as if the subclasses was defined it itself.

As an example, let us consider the class QLineEdit, i.e. the graphical user interface widget for reading user input from a specific box. When you need more information about this class, you can google with ”Qt LineEdit”. The first link brings you to the documentation about this class. There you can see several lists on the properties of the class, and the most essential ones of them are Public functions, Public slots, and Signals.

As will be told in other places in the Plussa material, slot function is otherwise like any function, and it can be called in a usual way, but it is additionally called, when a signal connected to it, is emitted. Signals are events that are caused by user actions in the graphical user interface. For example, the class QLineEdit has a signal returnPressed, that is emitted when the user has finished writing input and pressed Return key (or Enter key) from the keyboard.

Above it was described which sections can be found from main page of a class (by using QLineEdit as an example). If you want to know which methods the class provides, you are most probably interested in all methods of the class: both inherited ones and those ones the class has implemented by itself. Recall that all of them are identically available. Therefore it is a good idea to click the link: ”List of all members, including inherited members”. The opening list shows the type of the return value as the final item of the method title. For example, the line:

text() const : QString

tells that the return value type of text method is QString.

Based on the name of the methods, you can conclude which is the one you are searching for. Clicking the method name shows you more precise description and maybe also examples.