简体   繁体   English

QToolButton setStyleSheet可在win8上使用,而不是win7吗?

[英]QToolButton setStyleSheet works on win8, not win7?

The following works perfect on Windows 8.1, but not on Windows 7. The problem is that on Win7 setStyleSheet has no effect (compiled on 8.1 and deployed to 7). 以下内容在Windows 8.1上可完美运行,但在Windows 7上却不完美。问题是,在Win7上,setStyleSheet无效(在8.1上编译并部署到7)。

Any explanations or workarounds? 有任何解释或解决方法吗?

QToolButton* button = findChild<QToolButton*>( QString::number(buttonIdx) );

button->setStyleSheet("background-color: yellow; border-style: outset; border-width: 3px; border-radius: 5px; border-color: red; font: bold 10px; min-width: 1em; padding: 3px; ");

Problem was that I upgraded earlier from Qt5.2 to 5.4. 问题是我之前从Qt5.2升级到了5.4。 I didn't include the newer qt-dll's and platform in the deployment. 我没有在部署中包括较新的qt-dll和平台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM