How to save the pixmap of QWidget without borders/ what is way we can save best quality image
QPixmap * pixmap = new QPixMap(this->size())
Not sure what the question is...
Your code leaks memory
What borders ?
a widget don't have borders unless you do not give it a parent and it becomes a window?
@mrjj borders means we are getting scrollbars
Well if the widget has scrollbar shown, then render will also show them.
You could disable the scrollbars.
I have QGraphicsView and scene() is QGraphicsscene
QRectF rect = scene()->sceneRect();
QImage img(rect.width(),rect.height(), QImage::Format_RGB32);
render(&painter); // , QRec
how to save the pixmap without scrollbars . is it possible to get the pixmap of canvas without scrollbars how to get width of witdh of vertical and horizonal scrollbar so that I can get only rectangle for Canvas without scrollbar
how to get width of witdh of vertical and horizonal scrollbar so that I can get only rectangle for Canvas without scrollbar
Of course you'll have to make sure they are visible first
how to do that
what is way we can save best quality image
@Qt-Enthusiast isVisible function