Re: [Interest] Controls.Syles behavior on destroy

2014-05-02 Thread Glen Walker
BOUCARD Olivier boucard_olivier at yahoo.fr writes: Hi, I have a delegate Item which contains a Controls.Button with a ButtonStyle in Repeater. When an item is removed from the Repeater's model. I get a warning message ButtonStyle.qml:157: TypeError: Cannot read property of null from

Re: [Interest] Controls.Syles behavior on destroy

2014-04-20 Thread BOUCARD Olivier
Hello, I found a workaround. Here it is: import QtQuick 2.2 import QtQuick.Controls 1.1 import QtQuick.Controls.Styles 1.1 Button {   property Component _styleRemoval: ButtonStyle {}   Component.onDestruction: {     style = _styleRemoval;   } } I simply replace my style with a default one on

Re: [Interest] Controls.Syles behavior on destroy

2014-04-16 Thread Stéphane Fabry
Hello, I do not have this warning with QT 5.3 beta and my own style, does it depends on your custom style or do you also have the warning when using an empty ButtonStyle ? Could you provide the offending code ? Regards, Stéphane ___ Interest mailing

Re: [Interest] Controls.Syles behavior on destroy

2014-04-16 Thread BOUCARD Olivier
Hello, After further exploration. It appears to be linked to the use of a singleton. I use QML singleton for Theming as describe here. When I use my ButtonStyle from the songleton I have the warning. If I directly assign the same ButtonStyle directly to the style property of my Button I don't

[Interest] Controls.Syles behavior on destroy

2014-04-15 Thread BOUCARD Olivier
Hi, I have a delegate Item which contains a Controls.Button with a ButtonStyle in Repeater. When an item is removed from the Repeater's model. I get a warning message ButtonStyle.qml:157: TypeError: Cannot read property of null from the removed delegate Item instance. Is this a bug? Or am I