9.1.  Widget Categories

[ fromfile: widgets.xml id: widgetcategories ]

Qt widgets can be categorized in a number of ways to make it easier to find classes you are likely to use. The more complex widgets may cross over into more than one category. This section provides a brief overview of some of the classes you are likely to use as you start GUI programming.

There are four categories of basic widgets. Button widgets, in "Windows Style," are shown in Figure 9.2.

Figure 9.2. Buttons

Buttons

Input widgets, in "Plastique style," are shown in Figure 9.3.

Figure 9.3. Input Widgets

Input Widgets

Display widgets are noninteractive, such as QLabel, QProgressBar, and QPixmap.

Container widgets, such as the QMainWindow, QFrame, QToolBar, QTabWidget, and QStackedWidget, contain other widgets.

The widgets just described are used as building blocks to create other more complex widgets, such as

Figure 9.4.  Four Views of One Model

Four Views of One Model

In addition, there are some Qt classes that do not have any graphical representation (so they are not widgets) but are used in GUI development. They include

To see more widgets rendered in different styles, check out The Qt Widget Gallery, which contains a variety of screenshots and source code for rendering the widgets in different styles.