The code does not help much. We need to see how you make your drawing. But before: Your widget stays a square or your drawing?
to determine you can use:
{
paintMyWidget();
p.
setPen(QPen(Qt
::red,
1));
p.drawRect(rect().adjusted(0, 0, -1, -1));
}
void WykresSlupkowy::paintEvent(QPaintEvent *event)
{
paintMyWidget();
QWidget::paintEvent(event);
QPainter p(this);
p.setPen(QPen(Qt::red, 1));
p.drawRect(rect().adjusted(0, 0, -1, -1));
}
To copy to clipboard, switch view to plain text mode
So is the red border always a square?
Bookmarks