0
QPushButton
クラスを使用していて、スタイルシートの設定後にオブジェクトをQGraphicsProxyWidget
に追加しています。ただし、border-radius
と設定すると、background-color
はまだ境界線に重なります。どのように私はこれを取り除くのですか?QPushButton背景色が境界線に重なる
例:(levelOneEasyProxyがあるQGrpahicsProxyWidget
)
QPushButton* levelOneEasyButton = new QPushButton();
levelOneEasyButton->setGeometry(QRect(sceneRect().width()*0.05, sceneRect().height()*0.2, 70, 50));
levelOneEasyButton->setText("1");
levelOneEasyButton->setStyleSheet("QPushButton {"
"background-color: rgb(92, 249, 158);"
"color: white;"
"font-size: 16px;"
"border-style: solid;"
"border-width: 2px;"
"border-radius: 10px;"
"}"
"QPushButton:pressed {"
"background-color: rgb(66, 191, 118);"
"}");
levelOneEasyProxy = addWidget(levelOneEasyButton);
levelOneEasyProxy->setZValue(10.0);
現在の結果: