I did tried to use the code below to make left-click drag and multiple selection of cells. It works with multiple selection. However, I cannot make entered() and clicked() mutually exclusive to each other for a cell. It triggers double events called when clicked and the reverted the value. Any other approaches?
connect( tableView, SIGNAL(entered(const QModelIndex &) ), this, SLOT( setOnOff(const QModelIndex &) ) );
connect( tableView, SIGNAL(clicked(const QModelIndex &) ), this, SLOT( setOnOff(const QModelIndex &) ) );
To copy to clipboard, switch view to plain text mode
Also, how can I paint a "focus" rectangle upon mouse hover a QTableView's cell?
Bookmarks