equal
deleted
inserted
replaced
745 return false; |
745 return false; |
746 } else { |
746 } else { |
747 return false; |
747 return false; |
748 } |
748 } |
749 |
749 |
750 Qt::CheckState state; |
750 Qt::CheckState state = (static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked |
751 if ( flags & Qt::ItemIsTristate ) { |
|
752 state = static_cast<Qt::CheckState>( (value.toInt() + 1) % 3 ); |
|
753 } else { |
|
754 state = (static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked |
|
755 ? Qt::Unchecked : Qt::Checked); |
751 ? Qt::Unchecked : Qt::Checked); |
756 } |
|
757 return model->setData(index, state, Qt::CheckStateRole); |
752 return model->setData(index, state, Qt::CheckStateRole); |
758 } |
753 } |
759 |
754 |
760 QT_END_NAMESPACE |
755 QT_END_NAMESPACE |
761 |
756 |