I'm using a clipPath on my main widget in order to display a rounded shaped list.
like this :
QRectF maskRect
(rect
().
x(), rect
().
y(), rect
().
width(), rect
().
height() - 1);
setMask
(QRegion(ZePainterController
::get()->DrawRoundRect
(maskRect,
2000 / maskRect.
width(),
2000 / maskRect.
height()).
toFillPolygon().
toPolygon()));
QRectF maskRect(rect().x(), rect().y(), rect().width(), rect().height() - 1);
setMask(QRegion(ZePainterController::get()->DrawRoundRect(maskRect, 2000 / maskRect.width(), 2000 / maskRect.height()).toFillPolygon().toPolygon()));
To copy to clipboard, switch view to plain text mode
Problem is, it only takes a QRegion and QRegion isn't float based so the border is innacurate, as shown on the attached screen.
So I thought I would use a raised widget just to display that border above the rest.
It was yesterday night and I guess I was a bit tired . Maybe I could use some kind of graphic item insted ?
Bookmarks