I'm working with pyqt but it shouldn't make a difference here.
My issue is that I have a widget with some buttons, labels and some icons and generic images on it. I want to save that widget as a screenshot (not the entire window, as there is other widgets around), so I tried with mywidget.grab(), however the quality of the result is quite bad (specially the text at the labels)
Qt Code:
sshot = self.widgetReport.grab() sshot.save("test\file.png")To copy to clipboard, switch view to plain text mode
So my questions are:
- Is there any parameter for the grab method to adjust the quality of the image? (something like grab(quality=high))
- If the above is not possible, is there any way to Scale the content of everything in the widget before screenshoting it and then re-scale back to what it was? (I tried with mywidget.resize() but it only scaled the boundaries, not the content.
- Is there any other way to achieve my goal and get a screenshot of a widget with increased quality (for zooming purposes)?
Thanks in advance.
Bookmarks