Issue
How to set QTableWidget upper left corner using a background image? Now it is white. (Pointed in the image below)
This is my style sheet code:
QWidget {
background-image: url(src/bg.jpg);
color: #fffff8;
}
QHeaderView::section {
background-image: url(src/bg.jpg);
padding: 4px;
border: 1px solid #fffff8;
}
QTableWidget {
gridline-color: #fffff8;
}
QTableWidget QTableCornerButton::section {
background-image: url(src/bg.jpg);
border: 1px solid #fffff8;
}
Solution
You will have to use a custom row-headers column:
- disable the builtin row headers column,
- add a column to hold row numbers,
- define slots to update row ID when rows are added/removed and to select row, change its font etc,
- and finally set the widget to be used in column=0 column header.
Answered By - Oliver
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.