[Solved] Styling QTableView items
General and Desktop
5
Posts
3
Posters
3.4k
Views
1
Watching
-
Hi everybody,
I have a problem styling the border of the selected item in a QTableView.
Although I set the selection mode to no selection the border of the currently selected item is still drawn and I'd like it removed.
Here is a screenshot of the problem:
!http://i278.photobucket.com/albums/kk113/V-Ronin/Test_zps010fec55.png(Screenshot of the problem)!
the table stylesheet is:
@
"background-color: rgba(255,0,0,255);"
"border: none;"
@I tried using ::item but with no results.
Thanks in advance for the help
Luca -
Try to remove the border by disabling the focus using method "setFocusPolicy":http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#focusPolicy-prop and argument Qt::NoFocus.