Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [CLOSED] How To Access QML Singleton?
Forum Update on Monday, May 27th 2025

[CLOSED] How To Access QML Singleton?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 744 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SteveG
    wrote on 9 Mar 2014, 15:57 last edited by
    #1

    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

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SteveG
      wrote on 15 Mar 2014, 15:17 last edited by
      #2

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

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

      Steve

      1 Reply Last reply
      0

      1/2

      9 Mar 2014, 15:57

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved