how to increase the resolution of a tableview rendered into a pixmp ?
-
Hey Everyone,
I am using the following snippet to save a tableview to a png image. how do i increase the resolution of the image ?QPixmap pixIndexPage(tableView->size().width(), tableView->size().height()); QFile file("path/index.png"); file..open(QIODevice::WriteOnly); pixIndexPage.save(&file, "PNG");
-
Hi
Make the pixmap bigger, then it will have a higher resolution.
You also have to call resize on the table view to make it use the new size.
If the table view is in a layout this is not so easy as we cant resize it then.Can I ask what the issue is ? you render the GUI to pixmaps and they are blurry when you print them or
why you need higher res ? -
Hi,
AFAIR, the rendering resolution of a widget is tied to its size.
What kind of high resolution do you have in mind ?
-
Maybe I missed something. Nothing in the code snippet puts anything in the pixmap, it just makes an uninitialized one of the same pixel size as the tableView widget.