Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-39703

It should be able to use a property in a singleton from an another singleton

XMLWordPrintable

      It should be able to use a property in a singleton from an another singleton, please check the attached files for an example.

      SingletonOne.qml:
      pragma Singleton
      import QtQuick 2.2
      import SingletonTest 1.0

      QtObject {
      property string name: "SingletonOne; uses " + SingletonTwo.name
      }

      SingletonTwo.qml:
      pragma Singleton
      import QtQuick 2.2
      import SingletonTest 1.0

      QtObject {
      property string name: "SingletonTwo"
      }

      Should work.
      There can be a circular dependency, because singletonone imports SingletonTest 1.0 and SingletonTwo imports also SingleonTest 1.0, and in order to "Activate" that import SingletonOne needs to be instantiated, which needs to activate the SingleonTest 1.0 import, which needs to...

        1. singleton_test.tar.gz
          1 kB
          Qt Support
        2. singletondemo.tar.gz
          20 kB
          Spencer Schumann
        3. singletondemo.tar.gz
          2 kB
          Spencer Schumann
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            shausman Simon Hausmann
            qtcomsupport Qt Support
            Votes:
            7 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes