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

QDesignerPropertyEditorInterface::propertyChanged() not emitted for dynamic properties

    XMLWordPrintable

Details

    Description

      The QDesignerPropertyEditorInterface::propertyChanged() is not being emitted at all.

      Several things wrong here:

      Customer has a plugin (some crazy data model thing) in which he sets a dynamic "Name" property on a custom button. He connects to PropertyEditor::propertyChanged() and sets the value received on the button text if it is this "Name" property.

      Breaks in 4.4 since:

      1) core->propertyEditor() is 0 at the time the plugin is initialized since this is done earlier now to grab the default property values. This is, hmm, not optimal, but can be worked around with delayed initialization.

      2) propertyChanged() is no longer emitted by Designer's property editor This needs to be checked. I remember we had related trouble with some integration? (It is now propertyValueChanged()).

      3) It will further break in 4.5 due to the QVariant no longer being a string...Is there a way to register sth so that QVariant::toString() works?

      The example attached here fixes those points by delayed init and listening to propertyValueChanged().

      We pointed the customer to QEvent::DynamicPropertyChange.

      Attachments

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

        Activity

          People

            jkobus Jarek Kobus
            roschern Nils Christian Roscher-Nielsen (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes