Results 1 to 4 of 4

Thread: Regarding displaying image in grid.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Posts
    13
    Qt products
    Qt4

    Arrow Regarding displaying image in grid.

    I am trying to display the images in the grid using the below code.
    I am able to get the first image.But second image won't come .

    Qt Code:
    1. QGridLayout *grid = new QGridLayout();
    2.  
    3. //grid->setColumnMinimumWidth(2,30);
    4. imageLabel = new QLabel;
    5. imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    6. imageLabel->setScaledContents(true);
    7. setCentralWidget(imageLabel);
    8. resize(100,100);
    9. QString NextImagepath = "c:\\Data\\Images\\Pictures\\error.bmp";
    10. QPixmap Nextimage(NextImagepath);
    11. imageLabel->setPixmap(Nextimage);
    12. grid->addWidget(imageLabel,0,0);
    13. grid->addWidget(imageLabel,0,1);
    To copy to clipboard, switch view to plain text mode 

    what is the reason behind this?Information on this would be helpful.
    Last edited by wysota; 20th February 2009 at 11:27. Reason: missing [code] tags

Similar Threads

  1. problem in Displaying image on push button
    By durgarao in forum Qt Tools
    Replies: 4
    Last Post: 2nd January 2009, 10:27
  2. Displaying a portion of an image
    By tas in forum Qt Programming
    Replies: 4
    Last Post: 28th November 2008, 03:09
  3. Finding marks on scanned image for alignment
    By caduel in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2007, 02:10
  4. Replies: 3
    Last Post: 25th August 2007, 16:53
  5. displaying png image for a given area..
    By sar_van81 in forum Qt Programming
    Replies: 1
    Last Post: 17th January 2007, 13:56

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.