Select the entire row:
Ui. tablewidget-> setselectionbehavior (q1_actitemview: selectrows); // you can specify the unit of action for selecting a behavior.
Ui. tablewidget-> setselectionmode (q1_actitemview: singleselection); // sets the selection mode and selects a single row
Edit prohibited:
Ui. tablewidget-> setedittriggers (q1_actitemview: noedittriggers );
About the editing status document:
Constant |
Value |
Description |
Qabstractitemview: noedittriggers |
0 |
No editing possible. |
Q1_actitemview: currentchanged |
1 |
Editing start whenever current item changes. |
Qabstractitemview: doubleclicked |
2 |
Editing starts when an item is double clicked. |
Q1_actitemview: selectedclicked |
4 |
Editing starts when clicking on an already selected item. |
Q1_actitemview: editkeypressed |
8 |
Editing starts when the platform edit key has been pressed over an item. |
Q1_actitemview: anykeypressed |
16 |
Editing starts when any key is pressed over an item. |
Q1_actitemview: alledittriggers |
31 |
Editing starts for all above actions. |