Hi,

the Color Editor Factory example from the QT Documentation shows how to use the ColorListEditor as the default editor for a data from type QVariant::Color.

I noticed that by using the code from this example, the already existing default editors for a variety of data types (bool, double, int, QString,....) are not available anymore as the new created factory will contain ONLY the editor for the type QVariant::Color.

Qt Code:
  1. QItemEditorCreatorBase *colorListCreator = new QStandardItemEditorCreator<ColorListEditor>();
  2. factory->registerEditor(QVariant::Color, colorListCreator);
  3. QItemEditorFactory::setDefaultFactory(factory);
To copy to clipboard, switch view to plain text mode 


So I would like to know if this is the correct way to actually add the ColorListEditor to the already existing list of editors:

Qt Code:
  1. QItemEditorCreatorBase *colorListCreator = new QStandardItemEditorCreator<ColorListEditor>();
  2. factory->registerEditor(QVariant::Color, colorListCreator);
  3. QItemEditorFactory::setDefaultFactory(factory);
To copy to clipboard, switch view to plain text mode