Hey all,
do you know, how I can access the model (subclassed from QAbstractTableModel) from my delegate class? How do I get a pointer from the delegate class to my subclassed model? I subclassed QItemDelegate for my delegate...
I tried something like this:
void SchulungsplanDelegate
::paint(QPainter* painter,
const QStyleOptionViewItem
& option,
const QModelIndex &index
) const {
m_spModel = static_cast<SchulungsplanModel>(index.model() );
void SchulungsplanDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex &index) const
{
m_spModel = static_cast<SchulungsplanModel>(index.model() );
To copy to clipboard, switch view to plain text mode
bit this does not work, because(failure message):
no matching function for call to `SchulungsplanModel::SchulungsplanModel(const QAbstractItemModel*)' 200308 SchulungsplanDelegate.cpp line 25 1207902734474 1013
Bookmarks