Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20748

Q_GADGET's properties not recognized as members

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • Qt Creator 4.7.0-rc1
    • Quick / QML Support
    • None
    • Platform: macOS 10.13.5
      Qt Toolkit: 5.11.1 clang 64 bit

    Description

      I have defined a struct as a Q_GADGET and used it as a property of a QObject derived class. When I try to use it from QML, the editor says that my property does not have member, even though it has. The code works fine, only the editors (text and designer) fail to recognize the members.

      This makes the designer unusable, as it will not display anything except an error dialog.

      I've attached a simple code sample that shows the behavior and two screenshots - one shows the error in QtCreator and one shows the app running just fine, with correct behavior.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mabenell Marco Benelli
            iborco_altumo Ioan Călin Borcoman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes