QWidget* DSiNo::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const { QCheckBox *editor = new QCheckBox( parent ); editor->setText( index.model()->headerData( index.column(), Qt::Horizontal ).toString() ); editor->setTristate( false ); editor->setPalette( option.palette ); editor->setFont( option.font ); editor->setBackgroundRole( QPalette::Background ); return editor; }