Set not editable rows and column on QTableWidget

  • Hello,

    I'm using QTableWidget to store and edit data. Is it possible somehow to set some columns and (or) rows as not editable? How?

  • Lifetime Qt Champion

    You can set on the items
    QTableWidgetItem *item = new QTableWidgetItem();
    item->setFlags(item->flags() ^ Qt::ItemIsEditable);

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.