Results 1 to 4 of 4

Thread: Add pictures to tableview

  1. #1
    Join Date
    Jan 2011
    Posts
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Maemo/MeeGo

    Default Add pictures to tableview

    Hello,

    how could I add pictures to a tableview? I would like to add it to this program

    http://3adly.blogspot.com/2010/07/sq...nd-sqlite.html

    The pictures should be stored in a directory.

    Thank you for you help

    Goof

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Add pictures to tableview

    You can get an icon in the table view by having the model return a valid QIcon/QPixmap for the Qt::DecorationRole of the cells. You will need to customise a model to do this. If you want the entire table view cell to be an image then you will also need to provide a QStyledItemDelegate for the column to override how the table view item is drawn.

  3. #3
    Join Date
    Jan 2011
    Posts
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Maemo/MeeGo

    Default Re: Add pictures to tableview

    Please could you give me an example for this:

    picture.jpg | text |text1 |text2

    Thank you very much

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Add pictures to tableview

    Some one else perhaps.... I'm more concerned with the flood crisis in my corner of the world.
    http://www.abc.net.au/news/stories/2...12/3111075.htm

Similar Threads

  1. Add pictures svg in QIcon
    By giorgik in forum Qt Programming
    Replies: 2
    Last Post: 7th September 2010, 09:00
  2. runing from .exe and pictures
    By Arisss in forum Qt Programming
    Replies: 2
    Last Post: 16th January 2010, 17:10
  3. How to display 16 bit grayscale pictures?
    By reimer in forum Qt Programming
    Replies: 5
    Last Post: 20th August 2008, 19:55
  4. Help with opening many pictures
    By philipp1 in forum Qt Programming
    Replies: 3
    Last Post: 14th October 2006, 00:13
  5. QTextBrowser, html & pictures
    By jey in forum Qt Programming
    Replies: 3
    Last Post: 20th March 2006, 07:43

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
  •  
Qt is a trademark of The Qt Company.