Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

[CLOSED] How To Access QML Singleton?



  • If I have a QML type in Singleton.qml with
    @
    progma singleton
    . . .
    Rectangle{
    . . .
    property var myProperty
    . . .
    signal mySignal()
    . . .
    function myFunction{...}
    . . .
    }
    @

    can I do the following from multiple other QML files

    • Set/update myProperty
    • Respond to signal via onMySignal
    • Invoke myFunction

    Any examples would be especially useful.

    Thanks.

    Steve



  • @
    Set/update myProperty
    Respond to signal via onMySignal
    Invoke myFunction
    @

    I was recenty told that all three can be done with QML singletons.

    Steve


Log in to reply