C++ (Qt)TrackDelegate::TrackDelegate(int durationColumn, QWidget *parent) : QItemDelegate(parent){ edit = new QLineEdit((QWidget *)parent); ....}