Non-pixelized rounded corner for top-level window
问题 I want to set rounded corners on a QDialog. Since it is a top-level window, border-radius doesn't work, so I've to do this : QRegion EnterPinDialog::roundedRect(const QRect& rect, int r) { QRegion region; // middle and borders region += rect.adjusted(r, 0, -r, 0); region += rect.adjusted(0, r, 0, -r); // top left QRect corner(rect.topLeft(), QSize(r*2, r*2)); region += QRegion(corner, QRegion::Ellipse); // top right corner.moveTopRight(rect.topRight()); region += QRegion(corner, QRegion: