Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to get around bug with qmlRegisterSingletonType
Forum Updated to NodeBB v4.3 + New Features

How to get around bug with qmlRegisterSingletonType

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 1.2k Views 2 Watching
  • 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.
  • D Offline
    D Offline
    DBoosalis
    wrote on last edited by
    #1

    qmlRegsiterSingletonType seems to be broken with Qt 5.9.0 The following was working with earlier prereleases of Qt 5.9
    qmlRegisterSingletonType(url, uri, 1, 0, "theme");

    Keep getting run time errors that theme is undefined. It was working again with a version of Qt 5.9.1 in git but seems to have regressed as now it is broken again with the latest Qt.5.9.1 (git). Is there another way I can register my theme. Is there a mistake here ?

    An help appreciated.

    1 Reply Last reply
    0
    • jpnurmiJ Offline
      jpnurmiJ Offline
      jpnurmi
      wrote on last edited by
      #3

      QML type names should start with a capital letter. Try calling it Theme.

      D 1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Did you already check the bug report system about that matter ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • jpnurmiJ Offline
          jpnurmiJ Offline
          jpnurmi
          wrote on last edited by
          #3

          QML type names should start with a capital letter. Try calling it Theme.

          D 1 Reply Last reply
          2
          • jpnurmiJ jpnurmi

            QML type names should start with a capital letter. Try calling it Theme.

            D Offline
            D Offline
            DBoosalis
            wrote on last edited by
            #4

            @jpnurmi

            Sorry for the late reply. J-P you humbled me with that solution. Lesson learned - use capital letters for types. Could have sworn I wasn't using caps before and it worked. But anyway it is working now.

            Thanks to all who replied

            1 Reply Last reply
            0

            • Login

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