QTableView close/commit cell when using own delegate

  • Hi all,
    I have a standard QTableView and inside one column I use own delegate which uses a special widget as the editor. The special widget consists of a QLabel and a QPushButton which opens a dialog for file choosing. After one selects a file, a path to this file is displayed by the QLabel. The path is saved to a corresponding cell after I press enter key or if I click to a different cell. Is there any possibility to save the path to the cell immediately after a user chooses a file in the file dialog? In other words, I would like to get rid of necessity to press enter or clicking to a different cell.


  • Solved. The special widget sends a signal when a file is chosen. The signal is caught by the delegate which commits the changes - QAbstractItemDelegate::commitData(...).

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.