Hi! I’m new here and I can’t display a png with this code and I don’t know why…
It show me an empty window. I tried a lot of manipulation, but I can’t find any solution.
#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent)
{
QVBoxLayout *layout = new QVBoxLayout();;
QLabel *labelImage = new QLabel();
labelImage->setPixmap(QPixmap("logoCTD.png"));
layout->addWidget(labelImage);
setLayout(layout);
}
MainWindow::~MainWindow()
{
}
↧