How to cancel font shadow in nuke pyside

匆匆过客 提交于 2019-12-04 05:19:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!