学做饼干网站网站关键词优化排名
Qt样式表可以在帮助文档中搜索 "Qt Style Sheets" 在帮助文档中可更详细的查阅相关资料。
通常情况下我们需要知道样式表中的各个样式,需要我们查阅官方文档的相关资料;
可以在帮助文档中搜索 "Qt Style Sheets Reference"(样式参考表);
该样式参考表内容包括:
样式小部件列表;(LIst of Stylable Widgets)
属性列表; (List of Properties)
图标列表; (List of Icons)
属性类型列表; (List of Property Types)
伪状态列表; (List of Pseudo-States)
子控件列表;。 (List of Sub-Controls)
常用属性列表 List of Properties
背景相关(background):
background-color(背景颜色) : 小部件使用的背景颜色。
【例】:QLabel{background-color:yellow}
QLineEdit{background-color:rgb(255,0,0)}
background-image(背景图像) : 小部件背景图像
【例】:QFrame{background-image:url(:/images/hydro.png)}
background-repeat(背景位置)
background-attachment(背景附件)
background-origin()
框式和边框宽度,指定端层颜色(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-left:同上。
border-color : 所有边界的边缘的颜色。
【例】:QLineEdit{
border-width: 1px;
border-style : solid;
border-color : blue;
}
border-radius(边框圆角半径,):用来设置圆角
【例】:QLineEdit{
border-width: 2px;
border-style : solid;
border-radius: 4px;
}
border-style(边框样式) ; 常用的样式有,solid , none , dot-dot-dash。
【例】:QLabel{ border-style:solid };
button-layout : 按钮本身布局,常用的几种按钮布局,
0(WinLayout),1 (MacLayout), 2 (KdeLayout), 3 (GnomeLayout)
5 (AndroidLayout)。
【例】: *{button-layout: 2}