Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Create QML Image from C++
Qt 6.11 is out! See what's new in the release blog

Create QML Image from C++

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 951 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MartinD
    wrote on last edited by
    #1

    Hi,
    how to create dynamically QML Image element from C++?

    I'm creating puzle game with variable count of tiles. Each tile is represented by the image element in QML. I will then supply QImage to the image QML element via QQuickImageProvider. Or is there better solution?

    ? 1 Reply Last reply
    0
    • M MartinD

      Hi,
      how to create dynamically QML Image element from C++?

      I'm creating puzle game with variable count of tiles. Each tile is represented by the image element in QML. I will then supply QImage to the image QML element via QQuickImageProvider. Or is there better solution?

      ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      @MartinD said:

      Or is there better solution?

      Yes, provide image sources as a model from C++, create the visuals ie. QML Image elements in QML.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved