#ifndef DIALOG_H #define DIALOG_H #include <QDialog> namespace Ui { class Dialog; } class Dialog : public QDialog { Q_OBJECT public: explicit Dialog(QWidget *parent = 0); ~Dialog(); private slots: void on_pushButton_clicked(); public slots: void load(); private: Ui::Dialog *ui; }; #endif // DIALOG_H
void Dialog::load(){ QPixmap pixmap("/home/hor/1.jpg"); ui->label->setPixmap(pixmap); // label.setPixmap(pixmap); ui->label->show(); }
Quote:But it doesn't work!!
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)