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 .
//grid->setColumnMinimumWidth(2,30);
imageLabel->setScaledContents(true);
setCentralWidget(imageLabel);
resize(100,100);
QString NextImagepath
= "c:\\Data\\Images\\Pictures\\error.bmp";
imageLabel->setPixmap(Nextimage);
grid->addWidget(imageLabel,0,0);
grid->addWidget(imageLabel,0,1);
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);
To copy to clipboard, switch view to plain text mode
what is the reason behind this?Information on this would be helpful.
Bookmarks