Hello,
We are trying to use some custom items in a QTableWidget via setCellWidget() call. We are adding some QPushButton and QComboBox objects.
That works fine, but we also want to use the alternating colors feature of QTableView. In our stylesheet we specify alternating colors for QPushButton, QComboBox, etc like this:
QLineEdit,
QPushButton,
QComboBox,
QMenu {
selection-color: black;
selection-background-color: lightgrey;
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 black, stop: 1 rgb(128, 128, 128));
alternate-background-color: rgb(255, 0, 127);
min-width: 14px;
min-height: 14px;
border: 1px solid gray;
padding: 2px;
border-radius: 3px;
}
However, when push buttons and combo boxes are added to the table they all appear the same color with a little bit of the background color being drawn at the very corners.
Any ideas on how to fix this?
Thanks.
Bookmarks