Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator - Unknown properties with QML plugin
Forum Updated to NodeBB v4.3 + New Features

Qt Creator - Unknown properties with QML plugin

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 1.6k 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

    Hello,

    I created a QML plugin with a QQuickPaintedItem in it. I very much followed the way of the extending-qml example chapter 6. The item works and I can create a QML application which is using it.

    But I get errors in the code editor in Qt Creator. All properties, not only my custom ones, get "Invalid property name" M16 errors. Autocomplete does also not recognize the properties. But when i set them, e.g. the items color, and run the program, it works and the item has the right color. I have a plugins.qmltypes file in the plugins directory and it seems to be used, since Qt Creator tells me "typeinfo file read" when i hover the mouse over my import statement. In that typeinfo file, everything looks fine. All the properties are listed.

    So why does Qt Creator not recognize them? Is this normal, or have i done something wrong?

    Also I don't get an autocomplete, when i type in the import statement. If i enter import QtQuick, I get an autocomplete list of all sub-modules like QtQuick.Controls, QtQuick.Dialogs or QtQuick.Layouts. But i don't get this when i start entering the name of my QML plugin.

    Thanks for any help.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Thomas Hartmann
      wrote on last edited by
      #2

      Qt Creator needs a .qmltypes file that can be generated using qmlplugindump.
      For more details have a look here: http://doc.qt.io/qtcreator/creator-qml-modules-with-plugins.html

      M 1 Reply Last reply
      1
      • T Thomas Hartmann

        Qt Creator needs a .qmltypes file that can be generated using qmlplugindump.
        For more details have a look here: http://doc.qt.io/qtcreator/creator-qml-modules-with-plugins.html

        M Offline
        M Offline
        M.Steinhilber
        wrote on last edited by
        #3

        @Thomas-Hartmann
        As i stated in my post above " I have a plugins.qmltypes file in the plugins directory and it seems to be used, since Qt Creator tells me "typeinfo file read" when i hover the mouse over my import statement."

        But i still get the errors and no code completion.

        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