Results 1 to 3 of 3

Thread: Display Images in a TREEVIEW

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Posts
    54
    Qt products
    Qt/Embedded
    Platforms
    Symbian S60

    Default Display Images in a TREEVIEW

    Hi All

    I have a function where I am able to browse through specified directory (that contain images)

    /************************************************** *****************/
    void FrameDisplay::BrowseAndShow()
    {
    QDir dir("/home/kamlesh/Gall/GALL/images");
    dir.setFilter(QDir::Files);
    window = new QWidget;
    foreach( const QFileInfo& entry, dir.entryInfoList( QStringList()<< "*.png", QDir::Files) )
    {
    QString imgName = entry.fileName();
    QGridLayout* grid = new QGridLayout;
    QLabel* label = new QLabel(this);
    label->setPixmap(QPixmap(imgName));
    grid->addWidget(label);
    window->setLayout(grid);
    window->setGeometry(20,20,20,30);
    window->show();

    }

    }

    /************************************************** ****************/

    I need a way to display the images in a treeview structure e.g

    /****************************************/

    image1 image2
    filename filename

    image3 image4
    filename filename

    /****************************************/

    How should I go about it?
    Attached is the application GALL.zip and the macos style pdf for reference
    Attached Files Attached Files

Similar Threads

  1. How to display DDS images?
    By jamsession in forum Qt Programming
    Replies: 5
    Last Post: 12th June 2013, 22:18
  2. Display ToolTip when cibling a TreeView Cell
    By mourad in forum Qt Programming
    Replies: 0
    Last Post: 2nd November 2010, 08:33
  3. How do I display a list of images?
    By Morea in forum Qt Programming
    Replies: 2
    Last Post: 23rd November 2007, 08:49
  4. Is there any way to synchronize the display of images
    By kiransu123 in forum General Programming
    Replies: 2
    Last Post: 17th March 2007, 20:50
  5. Display animated images
    By suresh in forum Qt Programming
    Replies: 1
    Last Post: 27th January 2007, 21:53

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.