Results 1 to 5 of 5

Thread: save table as an image

  1. #1
    Join Date
    May 2008
    Posts
    24
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default save table as an image

    Hi all,

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

    Thanks in advance.

  2. #2
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: save table as an image

    If you want to replicate the screen representation you could use QPixmap::grabWidget().

  3. #3
    Join Date
    May 2008
    Posts
    24
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: save table as an image

    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.

  4. #4
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: save table as an image

    Well, how about QPixmap::save()?
    Qt Code:
    1. QPixmap::grabWidget(widget).save("image.jpg");
    To copy to clipboard, switch view to plain text mode 
    .

  5. #5
    Join Date
    May 2008
    Posts
    24
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: save table as an image

    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.

Similar Threads

  1. How can I save a QImage object into a SQLite3 database table?
    By danielperaza in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2008, 05:39
  2. Finding marks on scanned image for alignment
    By caduel in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2007, 02:10
  3. how to save somtihing drawed on QPaiter to an image?
    By cxl2253 in forum Qt Programming
    Replies: 3
    Last Post: 15th December 2006, 09:34
  4. Replies: 7
    Last Post: 12th August 2006, 15:11
  5. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 16:36

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.