I am new to Qt, and I am trying to create a simple GUI Application that displays an image once a button has been clicked on.
I can read the image in a QImage>
One common way is to add the image to a QLabel widget using QLabel::setPixmap(), and then display the QLabel as you would any other widget. Example:
#include
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPixmap pm("your-image.jpg");
QLabel lbl;
lbl.setPixmap(pm);
lbl.show();
return app.exec();
}