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. Propose making QQuickImage public in Qt 5.2
QtWS25 Last Chance

Propose making QQuickImage public in Qt 5.2

Scheduled Pinned Locked Moved QML and Qt Quick
8 Posts 4 Posters 4.3k 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 last edited by
    #1

    I propose making QQuickImage public so that custom Image component with "image" property can be implemented by subclassing QQuickImage.

    "This thread":http://qt-project.org/forums/viewthread/32763/ mentions the reason

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You're on the wrong place to do that (this forum is more user oriented), for such requests you should use the "bug report system":http://bugreports.qt-project.org and fill a "feature request" with all details explaining why it would be good (don't forget to check if one already exists)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Jens
        wrote on last edited by
        #3

        We have no plans to make QQuickImage public. In order to re-use QQuickImage for custom image sources, there is already a public API with QQuickImageProvider. If you need more custom behaviour than that, you can create a custom QQuickItem.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          Vincent007
          wrote on last edited by
          #4

          Thank Jens

          but I want to avoid reimplementing Image component completely.

          I think a new Image component with "image" property should be implemented officially.

          Because there are "image" property in UIImageView of iOS, ImageView of Android and ImageView of BB10 repectively.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jens
            wrote on last edited by
            #5

            But why can't you use a QQuickImageProvider a this is exactly what it is intended for. An "image" property is not very useful in qml.

            1 Reply Last reply
            0
            • V Offline
              V Offline
              Vincent007
              wrote on last edited by
              #6

              An “image” property can help ease implementing image processing applications.

              For example, an image is loaded via a network resource by Image component of QtQuick, “image” property can be used as an input of image processing tasks(implemented by C++), and then new image(return by C++ functions) can be assigned to “image” property to update Image.

              Imagine there were an image property, I can do that

              @Image {
              id: imageView
              source: http://qt-project.org/images/qt13a/Qt-logo.png
              onStatusChanged: if (image.status == Image.Ready) {
              var newImage = cppClass.imageProcess(imageView.image)
              imageView.image = imageView.image
              }
              }@

              Without "image" property, I need to download images by C++ code first, and then pass images to QQuickImageProvider.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sohail
                wrote on last edited by
                #7

                There is no way to process images loaded via QML without using a shader. So you'd need to think about if your processing can be done with a shader.

                I agree with Jens that exposing an "imageData" attribute of some kind would cover a very small number of use cases, which doesn't help you if you fall under that use case!

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  Vincent007
                  wrote on last edited by
                  #8

                  Thank sohail

                  I knew Shader Effects, I want to use Shader Effects too. However after Shader Effects are rendered, how to save results? The only way I know is grabbing drawing frames. The issue of grabbing drawing frames is that I cannot get full-resolution results because screen resolution is limited.

                  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