Solved class2->ui->label->setPixmap(ui->label->pixmap())
-
error: reference to type 'const QPixmap' could not bind to an rvalue of type 'const QPixmap *'
void FormProfile::edit()
{
EditProfile *editprofile=new EditProfile;
editprofile->ui->label->setPixmap(ui->label->pixmap());
} -
@sonichy Please read documentation!
http://doc.qt.io/qt-5/qlabel.html#pixmap-prop
setPixmap() expects to get a reference to a QPixmap not a pointer (http://doc.qt.io/qt-5/qlabel.html#pixmap-prop pixmap()returns a pointer).
Tryeditprofile->ui->label->setPixmap(*ui->label->pixmap());