问题
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.
This is my code,Thanks:)
# -*- 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_()
回答1:
This is the default style that Nuke uses. To change it, you'll need to set a different style... like so:
self.setStyle(QtGui.QStyleFactory.create('Plastique'))
来源:https://stackoverflow.com/questions/52838690/how-to-cancel-font-shadow-in-nuke-pyside