[Interest] Image on QLabel doesn't show at all

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Sat Dec 8 20:08:46 CET 2018


Am 08.12.2018 um 18:23 schrieb Tamás Nagy:
> Hi,
>
> pixmap = new QPixmap(imageUrl.toString());
> ui->imageLabel->setGeometry(QRect(QPoint(0,0), QPoint(pixmap->width(),
> pixmap->height()) ));
> ui->imageLabel->setPixmap(*pixmap);
> ui->imageLabel->setStyleSheet("background-image: url(" +
> imageUrl.toString() + ")");
> ui->imageLabel->update();
> ui->imageLabel->show();
>
> My image is C:\untitled.bmp
QPixmap can not load an image from an url - only from a local file or a 
resource.

Christian



More information about the Interest mailing list