PDA

View Full Version : Styling a QTableWidget



Imhotep
19th February 2018, 13:44
I created a derivative of the QTableWidget, and in its .h file I set the stylesheet




setStyleSheet(
"background-color: #2F2F2F;"
"border: 1px solid #4181C0;"
"color: #4181C0;"
"selection-background-color: #4181C0;"
"selection-color: #FFF;"

"QHeaderView::section {"
"border-top: 0px solid 4181C0;"
"border-bottom: 1px solid 4181C0;"
"border-right: 1px solid 4181C0;"
"background:#2F2F2F;"
"color: #4181C0;"
"}"
);


This is the output:

12772

How can I make the vertical scrollbar remain unstyled? I know I should write


setStyleSheet(
"<something> {"
"background-color: #2F2F2F;"
"border: 1px solid #4181C0;"
"color: #4181C0;"
"selection-background-color: #4181C0;"
"selection-color: #FFF;"
"};"
"QHeaderView::section {"
"border-top: 0px solid 4181C0;"
"border-bottom: 1px solid 4181C0;"
"border-right: 1px solid 4181C0;"
"background:#2F2F2F;"
"color: #4181C0;"
"}"
);


Can you tell me what is "<something>"?

Thank you in advance