PDA

View Full Version : disable highlighting of qtableview cells



ravas
24th May 2016, 22:27
In LibreCAD the Layers list is represented by a QTableView.
Each row is a layer, and it has columns / cells with icons for toggling visibility and locking the layer.
The issue is that when you click+hold+drag on a visibility icon's cell that cell becomes highlighted,
and the cell that has the layer's name becomes un-highlighted.

It's not that people intentionally click+hold+drag,
but that in the milliseconds before they release the mouse button,
moving the mouse a few pixels is enough to highlight the cell.

Is there anything that can be done?

anda_skoa
25th May 2016, 10:26
Does the underlying model include the Qt::ItemIsSelectable for these cells?
If yes, maybe it shouldn't?

Cheers,
_

ravas
25th May 2016, 19:31
Yes, thank you! :cool:
I really appreciate the help on this forum;
hopefully I can reciprocate eventually.

https://github.com/LibreCAD/LibreCAD/commit/417aa2e6fa1b2847e4869018b9078673a50877af