deck99
16th March 2011, 05:04
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
QGraphicsView* w = new QGraphicsView();
QGraphicsScene *scn = new QGraphicsScene( w );
w->setScene( scn );
QPixmap pix("/home/karl/Desktop/chem.jpg" );
scn->addPixmap( pix );
w->show();
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
QGraphicsView* w = new QGraphicsView();
QGraphicsScene *scn = new QGraphicsScene( w );
w->setScene( scn );
QPixmap pix("/home/karl/Desktop/chem.jpg" );
scn->addPixmap( pix );
w->show();