I am working on an application where I need to fill the color for the Pixmap using Painter. Pixmap is of type rectangle with (bottom edge) 2 rounded corners. Top 2 corners a
You can use QPainterPath for that :
QPainterPath path;
path.setFillRule( Qt::WindingFill );
path.addRoundedRect( QRect(50,50, 200, 100), 20, 20 );
path.addRect( QRect( 200, 50, 50, 50 ) ); // Top right corner not rounded
path.addRect( QRect( 50, 100, 50, 50 ) ); // Bottom left corner not rounded
painter.drawPath( path.simplified() ); // Only Top left & bottom right corner rounded