|
| ||||||||||
| Tags: c language, images, project, qlabel |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Displaying an image with Qt
Thank you in advance |
|
#2
| ||||
| ||||
| Re: Displaying an image with Qt Code: QLabel * label_img = new QLabel (this); QPixmap * pic_img = new QPixmap ( "d1/d2/img.jpg"); label_img -> setPixmap (pixmap_img *); QGridLayout gridLayout * = new QGridLayout; gridLayout -> addWidget (label_img); setLayout (gridLayout); |
|
#3
| |||
| |||
| Re: Displaying an image with Qt Code: #include ...
int main(int arg, char *arg[])
{
QApplication a(arg, arg);
QGraphicsScene scene;
QGraphicsView view(&scene);
QGraphicsPixmapItem item(QPixmap("d:\\image.png"));
scene.addItem(&item);
view.show();
return b.exec();
} |
|
#4
| |||
| |||
| Re: Displaying an image with Qt Code: QWidget * widget = new QWidget; QLabel * label = new QLabel; QPixmap * pic_img = new QPixmap ( "1.jpg"); / / 1 is in the directory that contains exe label -> setPixmap (pic_img *); QGridLayout gridLayout * = new QGridLayout (widget); gridLayout -> addWidget (label, 0, 0); setLayout (gridLayout); widget -> show (); |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Displaying an image with Qt" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Showing grey image instead of the Google TV in full screen and not getting image while setting up my TV source in New Logitech Revue | Diedrick | Technology & Internet | 7 | 15-02-2012 04:29 AM |
| problem with displaying image | ibiangalex | Software Development | 1 | 27-10-2010 03:31 AM |
| Nokia 6303, problem displaying image(s) | Ganaka | Portable Devices | 4 | 19-04-2010 10:28 AM |
| Displaying an image and text in a JSP | samualres | Software Development | 7 | 20-03-2010 10:43 AM |
| Displaying an Image In a JSP With a Access database | Henryosa | Software Development | 5 | 12-03-2010 02:52 PM |