I want to write a widget in Qt that doesn’t have decoration. And here I mean no title bar or any of that “gray area” a normal widget has. For example I want to draw a circle using QPainter:
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
painter.setBrush(QBrush(QColor(100, 100, 100,255), Qt::SolidPattern));
painter.drawEllipse(QPoint(200, 200), 50, 50);
and I want that circle to be the actual widget. For example when I click outside the circle on position (249,249) (which is outside the circle but inside the circle’s circumscribed square) to activate the entity beneath it(so to be a circle window, not a sqare one).
I’ve done some research but I didn’t get any further from a QSplashScreen which was the nearest thing to what i want (id doesn’t have decoration, i can draw on it but it still has that gray square area that forms the window and is clickable)
Can this be done in Qt?
I think the relevant properties are Qt::FramelessWindowHint and QWidget::setMask().