Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946
[Solved] Styling QTableView items
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:
I tried using ::item but with no results.
Thanks in advance for the help
leon.anavi last edited by
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.
It worked fine for me but, just for curiosity, is there a way to do the same thing via stylesheet?
lgeyer last edited by
I haven't tried, but due to beeing a QObject-property you might be able to style it using <code>qproperty-focusPolicy: "Qt::NoFocus"</code>.
I meant removing the border, not disabling the focus :D