Skip to content
Qt 6.11 is out! See what's new in the release blog
  • QImage from file path

    Solved Mobile and Embedded qimage uiimage qml
    3
    0 Votes
    3 Posts
    11k Views
    M
    Thank you so much. It is in fact a URL and you can use this to load it into a Image. void dataSender::fetchImage(QString filePath) { const QUrl url =filePath; if (url.isValid()) { qDebug() << "Valid URL: " ; QString test = url.path(); QImage myImage(test); qDebug() << "Image Size " << myImage.size(); } else{ qDebug() << "the url is invalid"; } }