QML Object 自定义的QML组件,首字母必须大写

A QML object type is a type from which a QML object can be instantiated.
In syntactic terms, a QML object type is one which can be used to declare an object by specifying the type name followed by a set of curly braces that encompasses the attributes of that object. This differs from basic types, which cannot be used in the same way. For example, Rectangle is a QML object type: it can be used to create Rectangle type objects. This cannot be done with primitive types such as int and bool, which are used to hold simple data types rather than objects.
Custom QML object types can be defined by creating a .qml file that defines the type, as discussed in Documents as QML object type definitions, or by defining a QML type from C++ and registering the type with the QML engine, as discussed in Defining QML Types from C++. Note that in both cases, the type name must begin with an uppercase letter in order to be declared as a QML object type in a QML file

你可能感兴趣的:(GUI,qt,QML)