PDA

View Full Version : save table as an image



ulmly
5th May 2008, 09:16
Hi all,

I want to save table created by QTable as an image. Could someone help me for doing so ?

Thanks in advance.

spud
5th May 2008, 12:25
If you want to replicate the screen representation you could use QPixmap::grabWidget().

ulmly
5th May 2008, 14:55
Thanks for the reply. Is it the only way to save a table as an image ? It would be nice if I am able to directly save or convert a table to a well-known image format file.

spud
5th May 2008, 15:14
Well, how about QPixmap::save()?

QPixmap::grabWidget(widget).save("image.jpg");.

ulmly
26th June 2008, 08:12
Thank for the reply and sorry for the lateness answer. Using QPixmap::grabwidget I am able to capture only the viewing area, not the whole table. I use Qt3. Could somebody here help me to save a whole table as an image ? Any help will be appreciated.