i passed the value of my rect:
for example :
QRect myrect
(0,
0,
2000,
4000);
QRect veiwRect
= widget
->rect
();
painter.setViewPort(viewRect)
painter.setWindow(myRect);
painter.drawRect(myRect);
QRect myrect(0,0,2000,4000);
QPoint(1000,2000);
QRect veiwRect = widget->rect();
painter.setViewPort(viewRect)
painter.setWindow(myRect);
painter.drawRect(myRect);
To copy to clipboard, switch view to plain text mode
I notice something else is that, it will fill the whole widget and it will not use its a coordinates, so even if was the height a way bigger than the width,
it still show that the width bigger than the height.
Bookmarks