Hello Everyone ,
I want to display a .jpg file in a child widget through QHboxLayOut class in a parent widget.
but it is not helping me. I mean it does not resize according to given Geometry......
My code is as follows........
QLabel *imageLabel;
imageLabel = new QLabel;
imageLabel->setBackgroundRole(QPalette::Base);
imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);

imageLabel->setScaledContents(true);
QImage image(mediaPath[currentIndex]);
imageLabel->setPixmap(QPixmap::fromImage(image));
QHBoxLayout *layout = new QHBoxLayout(parentWidget);
layout->addWidget(imageLabel);
parentWidget->setLayout(layout);
If anyone has any idea about it please give reply
Thanks.