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

Details

    Description

      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...

      Attachments

        1. singletondemo.tar.gz
          20 kB
        2. singletondemo.tar.gz
          2 kB
        3. singleton_test.tar.gz
          1 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes