28 #ifndef ROUNDEDMESSAGEBOX_H 29 #define ROUNDEDMESSAGEBOX_H 31 #include <QMessageBox> 35 #include <QStyleOption> 142 if (penWidth < 0.0) {
148 if (penWidth > 0.0) {
151 const qreal dlta = penWidth * 0.5;
171 #endif // ROUNDEDMESSAGEBOX_H The RoundedMessageBox class is a frameless QMessageBox implementation.
void setRenderHint(QPainter::RenderHint hint, bool on)
RoundedMessageBox(QWidget *parent=nullptr)
virtual int pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
void initFrom(const QWidget *widget)
void drawRect(const QRectF &rectangle)
void setPen(const QColor &color)
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
void setBrush(const QBrush &brush)
void paintEvent(QPaintEvent *) override
qreal borderWidth
-1 = use style hint frame width; 0 = no border; > 0 = use this width.
void adjust(int dx1, int dy1, int dx2, int dy2)
virtual void drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
qreal radius
desired radius in absolute pixels
QObject * parent() const const