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. Code completion for style singleton used as component

Code completion for style singleton used as component

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 379 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.
  • M Offline
    M Offline
    M.Steinhilber
    wrote on last edited by
    #1

    Hi,

    I'm using a singleton object in QML to style my Applications. This seems to be a broadly used technique and works well. The only problem I have with the approach is that I can't get code completion in many cases. Actually the only way I can get code completion to work, is using an Item instead of the mostly used QtObject as singleton and importing it with direct path.

    But as soon as I try to use the singleton not by a direct import of the path, but by specifying a QML2_INPUT_PATH or by using qmlRegisterSingletonType, i loose the ability of code completion. It still works to reference the values, so I can use the defined values and everythings compiles and runs fine and the defined color, size etc. is used. But its very unsatisfying to look up the exact names in the file all the time.

    Unitl now i tried using qmlRegisterSingletonType with direct HDD path and with qrc path, using qmldir with and without specifying a module and with and without qmltype info, using QtObject or Item. It works all the time, but only without code completion.

    Is this just not possible, or am i doing somehting wrong?

    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