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

QML Singleton Errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • 5.2.1
    • None
    • Windows 8 64 bit, Qt 5.2.1, Qt Creator 3.0.1, MinGW

    Description

      I have "pragma Singleton" as the first line of MySingleton.qml, main.qml contains "import MyNewSingleton 1.0" and qmldir contains "singleton MyNewSingleton 1.0 MySingleton.qml" and is in the common directory.

      The line "import MyNewSingleton 1.0" is underlined in red in Qt Creator and has the message "QML module not found."

      When I run the project I get the message

      qrc:/qml/main.qml:2:1: module "MyNewSingleton" is not installed

      I also tried to import "." but that didn't work.

      Code example is attached

      Attachments

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

        Activity

          People

            aalpert Alan Alpert
            steveg SteveG
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes