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
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
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
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
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