The answer https://stackoverflow.com/a/24909605/3125006 shows how to add a QPushButton into a QTableWidget cell. This works perfectly.
But then the background area around the PushButton is selectable. (Background turns into selection color when clicked). How can I prevent that?
The solution in Pogrammer_ARM's comment is a suitable workaround. With corrected case:
QTableWidget* tblSensors = new QTableWidget();
tblSensors->setStyleSheet("QTableWidget::item{ selection-background-color: rgb(255,255,255)}");
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments