Results 1 to 9 of 9

Thread: not able to load images to qtablewidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2010
    Posts
    29
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Question not able to load images to qtablewidget

    dear all,

    i have couple of questions

    1)i have simple program tat loads icons form "images" directory(located in current directory) to 3X3 qtablewidget. code is given below. but when i run the program i cant see any icons on qtablewidget.

    2) how do i set the iconsize


    for (int r = 0; r < t.rowCount(); ++r)
    {
    for (int c = 0; c < t.columnCount(); ++c)
    {
    QTableWidgetItem* item = new QTableWidgetItem;
    item->setBackgroundColor(Qt::black);
    item->setIcon(QIcon(QPixmap(":/images/*.png")));
    t.setItem(r, c, item);
    }
    }

    i have included the snapshot of output i get to make things much clear

    qt version= 4.7.0

    thanks

    regards
    rashmi
    Attached Images Attached Images

Similar Threads

  1. Load images in a sequence in QML
    By anupama in forum Qt Quick
    Replies: 1
    Last Post: 1st December 2010, 08:24
  2. Replies: 1
    Last Post: 16th November 2010, 17:45
  3. Three images to load and set transparency set for each
    By augusbas in forum Qt Programming
    Replies: 0
    Last Post: 29th October 2010, 11:42
  4. Load Images in a dir into a QScrollArea
    By nmuntz in forum Qt Programming
    Replies: 3
    Last Post: 20th January 2009, 21:03
  5. WekKit won't load JPEG images.
    By andrem in forum Qt Programming
    Replies: 4
    Last Post: 10th December 2008, 00:24

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