Congratulations to our 2022 Qt Champions!

How to define edit triggers in the QStyledItemDelegate

  • I have the custom QStyledItemDelegate that shows checkbox. It uses paint() to draw the editor, and editorEvent() to change data. This delegate used in the QTableWidget.

    How I can to determine is parent Table of delegate is editable or not ( in the editorEvent() )?

    I used setEditTriggers( QAbstractItemView::NoEditTriggers ) to disable editing in the table.

Log in to reply