QT 樣式表屬性大全
Box樣式
width:寬度
height:高度
max-width:最大寬度
max-height:最大高度
min-width:最小寬度
min-height:最小高度
margin:邊距尺寸
margin-top
margin-right
margin-bottom
margin-left
padding:填充尺寸
padding-top
padding-right
padding-bottom
padding-left
位置樣式
position:定位屬性
如果position是relative(默認值),則將子控件移動一定的偏移量;如果position是absolute,則指定子控件相對於父控件位置
top
right
bottom
left
字體樣式
font:字體樣式
font-family:字體類型
font-size:字體大小
font-style:字體風格
font-weight:字體粗細
font-color:字體顏色
文本樣式
text-decoration:文本修飾
text-align:水平對齊
背景樣式
background:背影樣式
background-color:背景顏色
background-image:背景圖片
background-repeat:背景重復
background-position:背景定位
background-attachment:背景固定
background-clip:設置元素的背景(背景圖片或顏色)是否延伸到邊框下面。
background-origin:指定背景圖片background-image 屬性的原點位置的背景相對區域
邊框樣式
border:邊框樣式
border-top
border-top-color
border-top-style
border-top-width
border-right
border-right-color
border-right-style
border-right-width
border-bottom
border-bottom-color
border-bottom-style
border-bottom-width
border-left
border-left-color
border-left-style
border-left-width
border-color:邊框顏色
border-style:邊框風格
border-width:邊框寬度
border-image:邊框圖片
border-radius:元素的外邊框圓角
border-top-left-radius
border-top-right-radius
border-bottom-right-radius
border-bottom-left-radius
顏色樣式
alternate-background-color:交替行顏色
gridline-color:QTableView中網格線的顏色
selection-color:所選文本或項目的前景色
selection-background-color:所選文本或項目的背景色
輪廓樣式
outline:輪廓屬性
outline-color:設置一個元素輪廓的顏色
outline-offset:設置 outline 與元素邊緣或邊框之間的間隙
outline-style:設置元素輪廓的樣式
outline-radius:設置元素的輪廓圓角
outline-bottom-left-radius
outline-bottom-right-radius
outline-top-left-radius
outline-top-right-radius
其他樣式
opacity:控件的不透明度
icon-size:控件中圖標的寬度和高度。
image:在子控件的內容矩形中繪制的圖像
image-position:在Qt 4.3及更高版本中,可以使用相對或絕對位置指定圖像圖像位置的對齊
spacing:控件中的內部間距
subcontrol-origin:父元素中子控件的原始矩形。
subcontrol-position:subcontrol-origin指定的原始矩形內子控件的對齊方式。
button-layout:QDialogButtonBox或QMessageBox中按鈕的布局
messagebox-text-interaction-flags:消息框中文本的交互行為
dialogbuttonbox-buttons-have-icons:QDialogButtonBox中的按鈕是否顯示圖標
titlebar-show-tooltips-on-buttons:是否在窗口標題欄按鈕上顯示工具提示。
widget-animation-duration:動畫應該持續多少(以毫秒為單位)。值等於零意味着將禁用動畫
lineedit-password-character:該QLineEdit的密碼字符作為Unicode數字。
lineedit-password-mask-delay:在將lineedit-password-character應用於可見字符之前,QLineEdit密碼掩碼延遲(以毫秒為單位)
paint-alternating-row-colors-for-empty-area:QTreeView是否為空白區域(即沒有項目的區域)繪制交替的行顏色
show-decoration-selected:控制QListView中的選擇是覆蓋整個行還是僅覆蓋文本的范圍。
引用自:https://blog.csdn.net/u011471873/article/details/92400144