#include "ParamTypeDelegate.h" #include #include "TypeSelectionItemModel.h" ParamTypeDelegate::ParamTypeDelegate() {} ParamTypeDelegate::~ParamTypeDelegate() {} void ParamTypeDelegate::setTypeSelectionModel(TypeSelectionItemModel* model) { m_typeSelectionModel = model; } QWidget *ParamTypeDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const { QWidget *w = nullptr; QComboBox *cmbbx = new QComboBox(parent); cmbbx->setModel(m_typeSelectionModel); w = cmbbx; // ... // m_ComboBox->setView(m_ColumnView); // m_ComboBox->view()->setCornerWidget(new QSizeGrip(m_ColumnView)); // m_ComboBox->view()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); // ... return w; }