For some unknown reason it compiled and now runs perfectly. With main :
ListDelegate delegate;
view.setItemDelegate(&delegate);
view.show();
ListDelegate delegate;
QListView view;
view.setItemDelegate(&delegate);
view.show();
To copy to clipboard, switch view to plain text mode
And ListDelegate constructor:
ListDelegate
::ListDelegate(QObject *parent
= 0){
}
ListDelegate::ListDelegate(QObject *parent = 0)
{
}
To copy to clipboard, switch view to plain text mode
I still am clueless as to why. I read the pixelator example on QT, and it's custom delegate class constructor is the same as mine, empty.
Now if I try to use a custom QAbstractListModel I get the same issues as I previously had with QAbstractItemDelegate.
Bookmarks