I am trying to round the corners of the current widget, but it doesnt work, why?
PopupWindow::PopupWindow() : QWidget(0) {
setWindowFlags(
Qt::Tool |
Qt::FramelessWindowHint |
Qt::WindowSystemMenuHint |
Qt::WindowStaysOnTopHint
);
this->resize(300, 100);
setStyleSheet(".PopupWindow {border-style: outset;border-width: 10px;border-radius:10px;}");
QPushButton *hello = new QPushButton("Hello world!");
hello->setFont(QFont("Times", 18, QFont::Bold));
hello->setGeometry(10, 40, 180, 40);
hello->setStyleSheet("");
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(hello);
setLayout(layout);
}
border-radiusis not supported by QWidget (border-styleandborder-widthare). Check out the documentation. Different widgets support a different subset of CSS properties.