There are a few questions on SO about this, all of which seem to say that the only way to remove the dotted border is to set the focusPolicy on widget/item in question to NoFocu
Set outline: 0
of the desired object. Refer following example which sets it for a QTableView
.
QTableView
{
outline: 0;
}
Works for QAbstractItemView
inherited classes. (QTreeWidget, QTableWidget
etc). Surprisingly this CSS property is not mentioned in the QT Documentation. See QT Style Sheet Reference Documenation.