13.3.  Table Models

[ fromfile: tablemodels.xml id: tablemodels ]

The next example is a table model with a view for displaying and editing actions and their corresponding shortcuts. To demonstrate the use and display of the different data roles supported in the Qt Model-View classes, we take a list of QActions and display it in a table. Each action can have an icon, tooltips, status tip, and other user data. These directly correspond to 4 of the available data roles.

Figure 13.9.  Shortcut Editor

Shortcut Editor