QMenu *menu = new QMenu(this);
menu->setWindowFlag(Qt::FramelessWindowHint); //重要
menu->setAttribute(Qt::WA_TranslucentBackground); //重要
menu->setStyleSheet(QString("QMenu { border-radius: 4px; }"));
QMenu *menu = new QMenu(this);
menu->setWindowFlag(Qt::FramelessWindowHint); //重要
menu->setAttribute(Qt::WA_TranslucentBackground); //重要
menu->setStyleSheet(QString("QMenu { border-radius: 4px; }"));
本文标题:QMenu设置圆角
本文链接:https://www.haomeiwen.com/subject/xhhxlctx.html
网友评论