I'm wondering if anyone knows of, perhaps a flag to disable the gray dotted border that appears when you single click on a QTableWidget's cell.
Thanks.
C++: tableWidget->setFocusPolicy(Qt::NoFocus);
Python: tableWidget.setFocusPolicy(QtCore.Qt.NoFocus)
Be aware that you will lose the ability to process keyboard events, but mouse events will work fine.
It seems like you want to remove the border when the cell gets the focus.
Try editing the Stylesheet as follows.
QTableWidget {
outline: 0;
}
This worked for me perfectly.
That gray dotted border indicates that that widget has focus.
Setting the below at the widget level should do the trick.
setFocusPolicy( Qt::NoFocus )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With