Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8277

Add sizeChanged and NOTIFY for QGraphicsWidget to enable property binding in QML

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.6.3
    • 4.6.2
    • Widgets: GraphicsView
    • None
    • 79a02c86c445e50630bcae62a4505f212281ec8b

      Adding sizeChanged and NOTIFY for QGraphicsWidget would enable property binding in QML. This would allow the following to work;

      Image {
        source: "background.png"
        width: label.size.width // binding to graphics widget's size
        height: label.size.height
        MyLib.Label {
            id: label
            text: "Hello world!"
        }
      }
      

      where 'MyLib' is a set of components based on QGraphicsWidget. However, it should be pointed out that heavy usage should be avoided as binding mechanism is not efficient compared to direct resize calls used by qml anchors and graphics layouts.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            menard Alexis Menard (closed Nokia identity) (Inactive)
            hhartz Henrik Hartz (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes