不会改变 placeholderText 的字体颜色。placeholderText 字体颜色是由操作系统或者应用程序的样式表决定的,如果想要改变 placeholderText 字体颜色,需要使用样式表来自定义。可以通过以下方式改变 QLineEdit 中 placeholderText 的字体颜色:
lineEdit.setStyleSheet("::placeholder { color: red; }")
其中 red
可以替换成其他颜色值。
不会改变 placeholderText 的字体颜色。placeholderText 字体颜色是由操作系统或者应用程序的样式表决定的,如果想要改变 placeholderText 字体颜色,需要使用样式表来自定义。可以通过以下方式改变 QLineEdit 中 placeholderText 的字体颜色:
lineEdit.setStyleSheet("::placeholder { color: red; }")
其中 red
可以替换成其他颜色值。
本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://qt.0voice.com/?id=426
还没有评论,快来说点什么吧~