QPushButton无效的边框macOS

时间:2019-04-17 09:39:31

标签: macos qt border

我正在尝试设置QPushButton的样式,但是在macOS上,边框出现了一些麻烦(在Windows / Ubuntu上看起来都不错)。问题在于不同的边框(顶部,底部,左侧,右侧)的大小不同。例如,左右边框不可见。我正在使用Qt.5.12.2。

我尝试设置Qt :: WA_MacNoShadow属性,但这没什么区别。我还尝试使用Qt5.9.8构建应用程序,但结果是相同的。

我正在使用以下代码来设置样式表:

this->setStyleSheet("QPushButton { color: #909090;"
                                  "background-color: #000000;"
                                  "border:5px solid #909090;"
                                  "border-radius: 10px;"
                                  "border-style: solid; }");

在macOS上的结果:

macOS

在Windows / Ubuntu上的结果:

Windows/Ubuntu

0 个答案:

没有答案