Entire row selection and cell editing prohibited in QT qtablewidget

Source: Internet
Author: User

 

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.