Is it possible to apply a delegate to a specific QTableWidget column and not to the entire table, and if so how?

  • @ MorkOFF48: publish as an answer, the descendants will say thank you. - VladD
  • I can't write answers to my questions yet - MorkOFF

2 answers 2

In the createEditor() function, analyze the value of index.column() . For the required column, return the created editor ( QWidget* ), for others - 0. In any case, delegate methods will be called for other columns, since the delegate is positioned "line by line".

    all, thanks, figured out tableWidget-> setItemDelegateForColumn (col, delegate)