QT之qss教程-QSpinBox

急行的小船發表於2017-11-10


QSpinBox {
	/* 為箭頭保留空間 */
	padding-right:20px;
	border:3px solid green;
	background:#FD5687;
	min-width:40px;
}

/* 向上按鈕 */
QSpinBox::up-button {
	subcontrol-origin:border;
	subcontrol-position:top right;
	width:16px;
	border-image:url(:/images/02.bmp);
	border-width:1px;
}

/* 向上按鈕 */
QSpinBox::up-button:hover {
	border-image:url(:/images/111.bmp) 1;
}

/* 向上按鈕 */
QSpinBox::up-button:pressed {
	border-image:url(:/images/222.bmp) 1;
}

/* 向上按鈕裡的小箭頭 */
QSpinBox::up-arrow {
	image:url(:/images/333.bmp);
	width:7px;
	height:7px;
}

/* 向下按鈕 */
QSpinBox::down-button {
	subcontrol-origin:border;
	subcontrol-position:bottom right;
	width:16px;
	border-image:url(:/images/02.bmp);
	border-width:1px;
	border-top-width:0;
}

/* 向下按鈕 */
QSpinBox::down-button:hover {
	border-image:url(:/images/111.bmp) 1;
}

/* 向下按鈕 */
QSpinBox::down-button:pressed {
	border-image:url(:/images/222.bmp) 1;
}

/* 向下按鈕裡的小箭頭 */
QSpinBox::down-arrow {
	image:url(:/images/333.bmp);
	width:7px;
	height:7px;
}


相關文章