当我在窗体上添加QPushButton时,得到以下信息:
您会看到丑陋的文本选择(进入按钮)。我如何将其删除?
这是此按钮的CSS:
enterButton->setStyleSheet("QPushButton { \
padding: 6px; \
background: #369; \
color: white; \
font-size: 13px;\
border: 0; \
border-radius: 3px; \
}\
QPushButton:hover { \
background: #47a; \
}\
QPushButton:pressed { \
background: #58b; \
}");
谢谢!
最佳答案
我现在没有安装Ubuntu
,但我认为outline: 0px
应该可以工作:
enterButton->setStyleSheet("QPushButton { \
padding: 6px; \
background: #369; \
color: white; \
font-size: 13px;\
border: 0; \
border-radius: 3px; \
outline: 0px; \
}\
QPushButton:hover { \
background: #47a; \
}\
QPushButton:pressed { \
background: #58b; \
}");
尝试一下,然后返回反馈。
关于css - 删除QPushButton文本周围的选择,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27027559/