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 destruction to avoid having 
tons of warnings.

Hope it can help someone.

Olivier

Le Mercredi 16 avril 2014 15h42, BOUCARD Olivier <[email protected]> a 
écrit :
 
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 have the warning.
>
>
>Olivier
>Le Mercredi 16 avril 2014 10h18, Stéphane Fabry <[email protected]> a écrit :
> 
>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 list
>>[email protected]
>>http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
>_______________________________________________
>Interest mailing list
>[email protected]
>http://lists.qt-project.org/mailman/listinfo/interest
>
>
>
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to