3
Q
的Qt - 细胞
A
回答
4
如果您使用的是自定义表格模型,则可以实施Qt::ItemFlags QAbstractItemModel::flags (const QModelIndex & index) const
方法并返回一组标志,其中未针对不希望编辑的单元格设置Qt::ItemIsEditable
标志。假设MyTableModel
从QAbstractTableModel
继承:
Qt::ItemFlags MyTableModel::flags (const QModelIndex & index) const {
Qt::ItemFlags flags = Qt::NoItemFlags;
if (index.row() == 0 && index.column() == 1) {
return flags;
}
return flags | Qt::ItemIsEditable;
}
相关问题
- 1. 从UILongPressRecognizer确定细胞的细胞
- 2. 填充gridview的细胞通过细胞
- 3. 细胞
- 4. 细胞
- 5. 细胞
- 6. 细胞
- 7. 细胞
- 8. 细胞
- 9. 操纵细胞和嵌套细胞
- 10. 在GridDataItem细胞以颜色细胞
- 11. PHP - 更新单细胞WHERE细胞
- 12. 订购细胞由中心细胞(S)
- 13. 单细胞之和空白细胞
- 14. 细胞的ImageView的
- 15. 中的tableview细胞
- 16. 的UITableView与细胞
- 17. 的UITextView CornerRadius细胞
- 18. jqGrid的:在细胞
- 19. 的GridView单细胞
- 20. 中的UltraGrid细胞
- 21. 的LibreOffice +细胞=宏
- 22. 细胞与TextView的
- 23. 从细胞
- 24. 细胞分割
- 25. 在handsontable细胞
- 26. 通过细胞
- 27. 细胞阵列
- 28. 上UITablView细胞
- 29. 细胞模式
- 30. 检索细胞
@Indraraj - 你或许应该在这里写关于你提出的更改的注释。我几乎拒绝了它。 –