Hi,
I've set it as an index widget within the view. I guess I didn't need a custom delegate for it?!
This is the code I've done to set column two to use a QSlider:
slider->setMinimum( 0 );
slider->setMaximum( 100 );
ui.tableView->setIndexWidget( modelIndex, slider );
QModelIndex modelIndex = m_pmodel->index(0,1,QModelIndex());
QSlider *slider = new QSlider(Qt::Horizontal,ui.tableView);
slider->setMinimum( 0 );
slider->setMaximum( 100 );
ui.tableView->setIndexWidget( modelIndex, slider );
To copy to clipboard, switch view to plain text mode
Think I got confused with using a custom delegate, guess the use of this would have been as an editor in the table - for instance, if one of the columns I wanted an input mask?
Regards,
Steve
Bookmarks