Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Extending QtCreator's QML editor to detect properties using external databases

    Tools
    1
    1
    420
    Loading More Posts
    • 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.
    • U
      u19809 last edited by

      HI all,

      AFAIk, the current editor in qtcreator uses the scanning of the source code to create a dictionary of objects-properties -methods of known things.

      Using that dictionary it is able to show a completion popup suggesting possible properties and methods.

      I would like to extend this source scanning method of populating the dictionary with a method (plugin) that manages a connection to an external database (of some kind). So the suggested completions do not come from source code but from this database.

      So if one would type 'external.' external would not refer to an object in source code but to a built in plugin which provides access to said database of properties and methods.

      I did check the QMLJsCompletionassist code but this does not show me how to create this special 'external' thing. AFAIK the ObjectValue refers to an object which has a method 'processMembers' (IIRC) which adds the possible completions to a list. I looks as if creating a special ObjectValue containing this special internal built-in object would be the most transparent solution. However I cannot find where this ObjectValue is created (i.e. where does typing in 'foo' lead to the objectvalue refering to the foo QObjectInstance) nor which methods should be implemented, from which Class I should preferrably inherit my special instance from.

      Suggestions more than welcome

      W

      1 Reply Last reply Reply Quote 0
      • First post
        Last post