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. How to implement UIImageView-like component?
Forum Update on Monday, May 27th 2025

How to implement UIImageView-like component?

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 2 Posters 2.1k Views
  • 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.
  • V Offline
    V Offline
    Vincent007
    wrote on 20 Sept 2013, 09:00 last edited by
    #1

    There is one "image" property in UIImageView. "image" is a UIImage object.
    pixel data can be accessed via "image" property. Therefore image processing tasks can be performed by using "image" property as a input and then new UIImage object can be assigned to "image" property. The UIImageView will be updated automatically after new UIImage is assigned.

    How to implement "image" property in my custom Image component?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 20 Sept 2013, 09:17 last edited by
      #2

      Subclass QQuickItem, add a Q_PROPERTY with relevant getters and setters, and you should be fine. But I have a feeling I have misunderstood you.

      (Z(:^

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Vincent007
        wrote on 20 Sept 2013, 09:43 last edited by
        #3

        Thank for your quick reply.

        Is it feasible? It seems difficult in this way because in this way I need to reimplement Image component completely in order to get all features of built-in Image component.

        How to avoid reimplementing Image component completely?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 20 Sept 2013, 09:53 last edited by
          #4

          Subclass the private class that creates the Image QML type. This, however, means you need to use custom build of Qt.

          (Z(:^

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Vincent007
            wrote on 20 Sept 2013, 10:22 last edited by
            #5

            Thanks again.

            I am going to propose making QQuickImage public.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 20 Sept 2013, 10:24 last edited by
              #6

              Has been done maaaany times already :) But keep trying and one day it might be made public :)

              (Z(:^

              1 Reply Last reply
              0

              1/6

              20 Sept 2013, 09:00

              • Login

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