}
/* make read only */
- int rcnt = mp_tableWidget->rowCount();
- int ccnt = mp_tableWidget->columnCount();
- for(int r=0; r < rcnt; r++) {
- for(int c=0; c < ccnt; c++) {
- QTableWidgetItem* item = mp_tableWidget->item(r, c);
- if (item) {
- item->setFlags(Qt::ItemFlags(item->flags() & (~Qt::ItemIsEditable)));
- }
- }
- }
+ m_tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
}
void JobList::prepareFilterWidgets()
tableJob->verticalHeader()->hide();
/* make read only */
- int rcnt = tableJob->rowCount();
- int ccnt = tableJob->columnCount();
- for(int r=0; r < rcnt; r++) {
- for(int c=0; c < ccnt; c++) {
- QTableWidgetItem* item = tableJob->item(r, c);
- if (item) {
- item->setFlags(Qt::ItemFlags(item->flags() & (~Qt::ItemIsEditable)));
- }
- }
- }
-
+ tableJob->setEditTriggers(QAbstractItemView::NoEditTriggers);
}
General:
23Aug09
+ebl Simplify the code to make TableWidget in read-only
kes Free Volume in several places. Fixes virtual-changer problem
and possibly bug #1346.
kes Add SD Volume debug code