I'm following this documentation page because I'm trying to implement a ColorComboBox Delegate of sorts to work over a custom data type (which recieves a QAbstractItemDelegate).

Thing is, this documentation page is either wrong or I'm just not getting it.

In http://doc.trolltech.com/4.5/itemvie...indow-cpp.html
that document, you can see something like this (at the very end)

Qt Code:
  1. setLayout(layout); setWindowTitle(tr("Color Editor Factory"));
To copy to clipboard, switch view to plain text mode 

That does not compile over a (reasonable from my PoV) "Identifier not found" error on "setLayout".

How can I fix that? this pointer doesn't provide a setLayout method.

How reliable are those documentation pages in general? It just so happens that that very documentation is EXACTLY what I need: A delegate for handling a color list selection.