Singleton Additional Property Issue



  • I am using Singleton file to have all the properties in a single file. So I have around 50+ properties in Styles.qml and it works.

    Issue:
    Whenever I keep adding new properties in Styles.qml I am getting some unusual issue .When I start using these properties I am getting "Unable to assign property"

    The code follows below :

    *****Styles.qml

    pragma Singleton
    import QtQuick 2.0

    Item{
    id:styleSheet

    //Login Dialog
    property string temp: "temp"
    property color mainwindowColor: "#cccccc"
    property color transparentColor: "transparent"
    property color whiteColor: "white"
    property color titleTextColor: "#00385F"
     .
     .
    

    }

    To make it Singleton I have used qmldir :
    singleton Styles 1.0 Styles.qml


  • Moderators

    @Adithya
    you say it works but still got an issue?
    What does working mean in this case then?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.