I have created a Qt interface, add a Qlabel and set pixmap to an image. imagelabel =
new QLabel(centralwidget);
imagelabel->setObjectName(QString::fromUtf8("imagelabel"));
imagelabel->setGeometry(QRect(20, 10, 371, 311));
imagelabel->setPixmap(QPixmap(QString::fromUtf8(":/liqi/kinect.png")));
this is the code displayed in ui_mainwindow.h when i preview it using the Qtdesigner, the image can be displayed. But when i run using codeblocks, everything like buttons etc is fine but the image does not appear. Do i need to add anything into the section below ?
MainWindow::MainWindow(Tqt_interface* tqt, QWidget *parent ) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}