I want to insert a photo into a label on QT
QPixmap pix
("C:\Users\haral\OneDrive\Documents\NY\Nyeveier.jpg");
ui->label_Pic->setPixmap(pix.scaled(100,100,Qt::KeepAspectRatio));
QPixmap pix("C:\Users\haral\OneDrive\Documents\NY\Nyeveier.jpg");
ui->label_Pic->setPixmap(pix.scaled(100,100,Qt::KeepAspectRatio));
To copy to clipboard, switch view to plain text mode
I use this code
but get an error U used with no following hex digtis in line 1
Added after 5 minutes:

Originally Posted by
Johnsen
I want to insert a photo into a label on QT
QPixmap pix
("C:\Users\haral\OneDrive\Documents\NY\Nyeveier.jpg");
ui->label_Pic->setPixmap(pix.scaled(100,100,Qt::KeepAspectRatio));
QPixmap pix("C:\Users\haral\OneDrive\Documents\NY\Nyeveier.jpg");
ui->label_Pic->setPixmap(pix.scaled(100,100,Qt::KeepAspectRatio));
To copy to clipboard, switch view to plain text mode
I use this code
but get an error U used with no following hex digtis in line 1
I found a solution to the error, but image will not appear.
Bookmarks