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>
Simple, but complete example showing how to display QImage might look like this:
#include
#include
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QImage myImage;
myImage.load("test.png");
QLabel myLabel;
myLabel.setPixmap(QPixmap::fromImage(myImage));
myLabel.show();
return a.exec();
}