prajna
20th February 2009, 10:35
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 .
QGridLayout *grid = new QGridLayout();
//grid->setColumnMinimumWidth(2,30);
imageLabel = new QLabel;
imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
imageLabel->setScaledContents(true);
setCentralWidget(imageLabel);
resize(100,100);
QString NextImagepath = "c:\\Data\\Images\\Pictures\\error.bmp";
QPixmap Nextimage(NextImagepath);
imageLabel->setPixmap(Nextimage);
grid->addWidget(imageLabel,0,0);
grid->addWidget(imageLabel,0,1);
what is the reason behind this?Information on this would be helpful.
I am able to get the first image.But second image won't come .
QGridLayout *grid = new QGridLayout();
//grid->setColumnMinimumWidth(2,30);
imageLabel = new QLabel;
imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
imageLabel->setScaledContents(true);
setCentralWidget(imageLabel);
resize(100,100);
QString NextImagepath = "c:\\Data\\Images\\Pictures\\error.bmp";
QPixmap Nextimage(NextImagepath);
imageLabel->setPixmap(Nextimage);
grid->addWidget(imageLabel,0,0);
grid->addWidget(imageLabel,0,1);
what is the reason behind this?Information on this would be helpful.