Properties binding doesn't work

• Feb 1, 2016 - 14:41

When we use
   pluginType: "dialog"
we can use different elements inside dialog window such as Text or Rectangle or others.
According to Qt documentation properties declaration such as
   Rectangle { height: parent.height
or
   anchors.fill: parent
binds element property to the property of the parent, but it doesn't work in plugin examples "scorelist", "helloqml" and some test examples I have written.

Why so and how can we bind in "dialog" plugins properties of dialog elements to the parent?


Comments

I should correct the question!
I've found that binding doesn't work in PluginCreator but works when we call plugin from Plugins menu.

So actual question is - why binding doesn't work in PluginCreator?

In reply to by straannick

I can't give you a real answer (yet). But I do know that running your plugin from the Plugin Creator means that internally it creates a new Component/QQuickView on the spot. When ran from the menu, your plugin likely has already been constructed internally (but I haven't looked up yet how).

I strongly suspect that either not the same logic is used to create the plugin instance, or that the time of doing so generates different results (possibly inherent to Qt).

In reply to by straannick

Well, it's a bug... if we have to document every single bug in the handbook, it will become a 10000 pages handbook and nobody would read it... Can you submit an issue in the issue tracker instead?

If anyone wants to take a look:

Plugins triggered from the menu are constructed here https://github.com/musescore/MuseScore/blob/522e84dfb196ac7a61830c4666f…

Plugins triggered from the plugin creator are created here https://github.com/musescore/MuseScore/blob/522e84dfb196ac7a61830c4666f…

Do you still have an unanswered question? Please log in first to post your question.