Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-88008

qqmlmetatype.cpp: bad warnings

    XMLWordPrintable

Details

    • All

    Description

      I'm in the process of getting my qskinny project running with Qt6. Qt has been build in debug mode !

      When exposing Q_GADGET types to Qml I have f.e the following warning: "checkRegistration: Invalid QML element name "SizePolicy"; value type names should begin with a lowercase letter".

      However the code runs fine without the "", while it does not work when adding a "" prefix like requested from qqmlmetatype.cpp. The same is for all of my Q_GADGETS.

      My class Definitions looks like this:

      class QskSizePolicy
      {{{}}
           Q_GADGET      ...};
       

      class QskControl : public QQuickItem

      Unknown macro: {     Q_OBJECT    Q_PROPERTY( QskSizePolicy sizePolicy READ sizePolicy WRITE setSizePolicy )}

      ;

      see

      https://github.com/uwerat/qskinny/blob/master/src/common/QskSizePolicy.h

      https://github.com/uwerat/qskinny/blob/master/src/controls/QskControl.h

      The code for registration is then:

      }}{{}}{{ qRegisterMetaType< QskSizePolicy >();
      {{ qmlRegisterUncreatableType< QskSizePolicy >( "Skinny", 1, 0, "SizePolicy", QString() );}}

      see https://github.com/uwerat/qskinny/blob/master/qmlexport/QskQml.cpp

      ( Code on github does not yet build with Qt6 )

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            uwe Uwe Rathmann
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes