Combo Boxes in Item Views

From Qt Wiki
Revision as of 15:08, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Combo Boxes in Item Views

Sample code to use combo boxes as editor widgets in an item view or item widget.

The delegate creates a combo box if the index is in the second column of a list view. For the other columns it just returns the default editor, that QStyledItemDelegate [qt.io] creates.

File itemdelegate.h

File itemdelegate.cpp

File main.cpp

Categories: