@SGaist said in Qt WebAssembly Widget Buttons not responding:
Depending on what you need these files for, you can use Qt's resource system.
I think this is the best approach.
Other way is using QNetworkAccessManager to download the image, this has the benefit that you can download images from external websites as well, something like:
QNetworkAccessManager *manager = new QNetworkAccessManager(this);
QNetworkReply *reply = manager->get(QNetworkRequest(QUrl("https://domain/image_url.jpg")));
connect(manager, &QNetworkAccessManager::finished, [&](QNetworkReply *reply){
qWarning() << "replyFinished";
QPixmap *image = new QPixmap(this);
image->loadFromData(reply->readAll());
ui->label->setPixmap(QPixmap(*image));
});
connect(reply, &QIODevice::readyRead, [](){qWarning() << "reply";});
connect(reply, &QNetworkReply::errorOccurred, [](){qWarning() << "errorOccurred";});