I have a UI, which automatically sets font shadow in nuke, and how to cancel it.
I want the font on this button to look like this, so there is no font shadow.
这是我的代码,谢谢:)
# -*- coding:utf-8 -*-
from PySide import QtGui
class MyButton(QtGui.QDialog):
def __init__(self,parent=None):
super(MyButton, self).__init__(parent)
v_layout = QtGui.QVBoxLayout(self)
btn = QtGui.QPushButton("Submit")
v_layout.addWidget(btn)
self.setStyleSheet("""
QPushButton{
height: 50px;
border: 0px solid rgba(255, 255, 255, 0);
font-size: 18px;
font-family: "Microsoft YaHei";
border-radius: 4px;
color: rgba(255, 255, 255, 255);
background-color: #7cd1ef;
}
""")
if __name__ == '__main__':
app=QtGui.QApplication([])
mb = MyButton()
mb.show()
app.exec_()
这是 Nuke 使用的默认样式。要更改它,您需要设置不同的样式......就像这样:
self.setStyle(QtGui.QStyleFactory.create('Plastique'))
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)