0
我用它來設置我的QTableWidget
的樣式。除了horizontalheaderlabels
和the row numbers
以外,表格中的所有內容都受到影響。PyQt QTableWidget horizontalheaderlabel樣式表
Table.setStyleSheet("Background-color:rgb(100,100,100);border-radius:15px;")
所以,我想這個
Table.horizontalHeader().setStyleSheet("Background-color:rgb(190,1,1);border-radius:14px;"
但這並不似乎有任何影響。
如何設置horizontalheaderlabel
和the row numbers
的樣式表?
什麼'::節'的東西呢?通常我只會寫'(「Background-color:rgb(255,255,0);」)' –
如果直接在水平標題上應用樣式表,它將應用於標題「background」,即不在文本單元上的標題。這就是::部分的用途。或者,您可以使用QHeaderview :: section {...}並將樣式表直接應用於表格窗口小部件 – Yoann