Results 1 to 6 of 6

Thread: displaying scaled image

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011
    Posts
    14
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default displaying scaled image

    hi........
    i have a image where i want to show it on specified Qgraphicsview on the mainwindow. the image display out of specified qgraphicsview with scroll bars. i want the image to show on that specific qgraphicsview.

    chem.jpg is the image

    Qt Code:
    1. QGraphicsScene *scn = new QGraphicsScene( w );
    2.  
    3. w->setScene( scn );
    4. QPixmap pix("/home/karl/Desktop/chem.jpg" );
    5. scn->addPixmap( pix );
    6. w->show();
    To copy to clipboard, switch view to plain text mode 
    Attached Images Attached Images

Similar Threads

  1. Display full scaled image on a QLabel
    By dcole in forum Qt Programming
    Replies: 2
    Last Post: 10th October 2013, 21:49
  2. Displaying an image
    By seltra in forum Newbie
    Replies: 2
    Last Post: 3rd October 2010, 19:30
  3. as displaying an image in a mdi?
    By Lycus HackerEmo in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2010, 12:14
  4. Displaying image
    By Rui in forum Newbie
    Replies: 1
    Last Post: 20th June 2009, 21:15
  5. Replies: 0
    Last Post: 6th April 2009, 01:20

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.