Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有样式表标签可用于更改 QLineEdit 中占位符文本的字体/字体大小(仅此而已,保持正常的编辑文本不变)?
占位符仅在text()为空时显示。连接textChanged到您的插槽并使用setFont. 如果text()为空,则设置占位符字体,而不是设置普通字体。
text()
textChanged
setFont