Important: Please read the Qt Code of Conduct -


  • The four Column is use QStyledItemDelegate, but when first Click on The cell for four Column,The selected is the cell, can select the cell the editor is edited state?


  • @charry
    Hi and welcome.

    I think I understand the first part of your sentence: "All 4, or at least the 4th column, use QStyledItemDelegate. When I first click on the cell for the 4th column, that becomes the selected cell." Right?

    But what does

    can select the cell the editor is edited state?

    mean? We know English is not the native language of many of our members, but can you try to clarify?

  • When I click on the fourth column of the table, the first click selects the cell, and I need to click once to select the edit box. It means that I need to click twice when to edit. (The fourth column is implemented by QStyledItemDelegate), sorry, that you can’t understand.

  • @charry
    Yes, you are normally supposed to double-click to edit a cell (one click to select the cell, double-click to edit the cell).

    If you want single-click to edit, you should look at, say, QTableView::setEditTriggers(QAbstractItemView::AllEditTriggers). See if one of those values do what you want? If not, have a read through e.g., there are other possibilities there. Or further hits via Google qtableview click edit.

  • This post is deleted!