Hello again. I know it doesn't make sense to use ~Qt::ItemIsEditable, but it has worked in every other case. I tried I tried replacing the AND with an OR and removing the ~, but it still doesn't work. I tried installing an event filter on the object, but it doesn't seem to recognize my mouse clicks. I gets other events, but not QEvent::MouseButtonPress....
EDIT:
I figured it out. It was the ItemEditor that was eating the events.
I had the following code:
// EDITOR CALLS
new QStandardItemEditorCreator<ColorListEditor>();
factory
->registerEditor
(QVariant::Color, colorListCreator
);
// EDITOR CALLS
QItemEditorFactory *factory = new QItemEditorFactory;
QItemEditorCreatorBase *colorListCreator =
new QStandardItemEditorCreator<ColorListEditor>();
factory->registerEditor(QVariant::Color, colorListCreator);
QItemEditorFactory::setDefaultFactory(factory);
To copy to clipboard, switch view to plain text mode
And by doing that, it seemed to have been consuming the events. I have decided to remove the editor, and write a custom delegate to display the combo boxes in only specific columns.
Thanks for all your input =)
Bookmarks