Results 1 to 2 of 2

Thread: Increase the quality of the image when you Grab() a widget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2017
    Posts
    11
    Qt products
    Qt5
    Platforms
    Windows

    Default Increase the quality of the image when you Grab() a widget

    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:
    1. sshot = self.widgetReport.grab()
    2. 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.
    Last edited by Saelyth; 7th September 2017 at 16:13. Reason: Better this way

Similar Threads

  1. Help with QWidget::grab
    By mikea in forum Newbie
    Replies: 6
    Last Post: 19th September 2014, 09:58
  2. Replies: 7
    Last Post: 30th May 2011, 23:10
  3. How to grab screen on thread?
    By Alex Snet in forum Qt Programming
    Replies: 6
    Last Post: 18th May 2009, 21:08
  4. grab images from Phonon video
    By Kraut~salat in forum Qt Programming
    Replies: 3
    Last Post: 19th January 2009, 09:53
  5. Grab idea from Amarok
    By jiveaxe in forum Qt Programming
    Replies: 8
    Last Post: 6th November 2007, 18:11

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.