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. Extending QtCreator's Syntax Highlighting with a Plugin
Forum Updated to NodeBB v4.3 + New Features

Extending QtCreator's Syntax Highlighting with a Plugin

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 4.2k Views 1 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.
  • G Offline
    G Offline
    Gary_
    wrote on 23 Sept 2010, 21:27 last edited by
    #1

    Is it possible to extend the Syntax Highlighting and Intellisense in QtCreator to accept QML Extensions through Plugins?

    For example, I create a plugin that registers a new Component Type: Cat. Cat has the property legs.

    @
    Item {
    Cat {
    id: ilean
    legs: 2
    }
    }
    @

    Cat will be underlined in Red showing the IDE developer that Cat is illegal. And intellisense will not pick up legs as an accepted property.

    Is it currently possible to extend the syntax definitions?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on 24 Sept 2010, 00:54 last edited by
      #2

      Hi,

      I believe the information comes from the xml files in the qml-type-descriptions folder (in the creator source tree located at src/share/qtcreator/qml-type-descriptions), which are generated using the qmldump tool (src/tools/qml/qmldump). You could try generating a similar file for your plugin.

      Michael

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Gary_
        wrote on 28 Sept 2010, 02:43 last edited by
        #3

        Perfect! Thanks!

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on 28 Sept 2010, 08:33 last edited by
          #4

          Have you tried using a snapshot of Qt Creator? The QML handling has seen much work, maybe that already works there already (I think it does, but I am not 100% sure).

          1 Reply Last reply
          0

          1/4

          23 Sept 2010, 21:27

          • Login

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