|
|
@ -2,6 +2,8 @@ |
|
|
|
#include "mainWindow.h" |
|
|
|
#include "mainWindow.h" |
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv) { |
|
|
|
int main(int argc, char **argv) { |
|
|
|
|
|
|
|
Q_INIT_RESOURCE(stuff); |
|
|
|
|
|
|
|
Q_INIT_RESOURCE(stuff2); |
|
|
|
QApplication app(argc, argv); |
|
|
|
QApplication app(argc, argv); |
|
|
|
MainWindow *win = new MainWindow(); |
|
|
|
MainWindow *win = new MainWindow(); |
|
|
|
QImage qi(":/thing.png"); |
|
|
|
QImage qi(":/thing.png"); |
|
|
@ -13,7 +15,20 @@ int main(int argc, char **argv) { |
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
win->setWindowTitle("Meson Qt5 build test"); |
|
|
|
win->setWindowTitle("Meson Qt5 build test"); |
|
|
|
|
|
|
|
QLabel *label_stuff = win->findChild<QLabel *>("label_stuff"); |
|
|
|
|
|
|
|
if(label_stuff == nullptr) { |
|
|
|
|
|
|
|
return 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
int w = label_stuff->width(); |
|
|
|
|
|
|
|
int h = label_stuff->height(); |
|
|
|
|
|
|
|
label_stuff->setPixmap(QPixmap::fromImage(qi).scaled(w,h,Qt::KeepAspectRatio)); |
|
|
|
|
|
|
|
QLabel *label_stuff2 = win->findChild<QLabel *>("label_stuff2"); |
|
|
|
|
|
|
|
if(label_stuff2 == nullptr) { |
|
|
|
|
|
|
|
return 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
w = label_stuff2->width(); |
|
|
|
|
|
|
|
h = label_stuff2->height(); |
|
|
|
|
|
|
|
label_stuff2->setPixmap(QPixmap::fromImage(qi2).scaled(w,h,Qt::KeepAspectRatio)); |
|
|
|
win->show(); |
|
|
|
win->show(); |
|
|
|
return app.exec(); |
|
|
|
return app.exec(); |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|