Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.2, 5.4.1, 5.5.0 Alpha
-
None
-
235abf6486c221e4dc763b614ac33771abdd8f3f
Description
Currently the TableView exposes the following signals:
- activated(int row)
- clicked(int row)
- doubleClicked(int row)
- pressAndHold(int row)
The same signals are present in the TreeView with the row
argument morphed to index (QModeIndex)
The main issue arise with the clicked signals. This could be interesting for handling for example context menu for a given row or item however there's no information about the fact that a given Row has been clicked with the right or left mouse button.
The workaround is to reimplement the rowDelegate and add a MouseArea.
This however causes the rewrite of all the rowDelegate logic.
Another problem is handling of clicks that doesn' collide with a row of the TreeView/TableView.
Currently on the TableView we can detect if the a click collide with a row by using the "rowAt(x,y)" function.
This function returns -1 if the there's no row at the given x,y coordinates.
However there's not such functionality on the TreeView.
The use case is resetting the current selection if the user click on the TableView/TreView background.