qt5 - Cannot create certain QML types in a singleton -
A QML Singleton to use the style defined as I have defined: Pragma Singleton import QtQuick 2.2 Import QtQuick.Controls 1.1 Import QtQuick.Controls.Styles 1.1 QtObject {property ProgressBarStyle progressBarErrorStyle: ProgressBarStyle {background: Rectangle {radius: 2 color: "lightgray" border.color: "gray" border.width: 1 implicitWidth: 200 implicitHeight: 20} progress: Rectangle {color: "orange" range: color: "red"}}} I can import the object and am using it , Though progressBarErrorStyle is always given the code ProgressbarStyle_clataipe 7 / . If I change it to rectangle , then it is typed correctly as QQuickRectangle . QtQuick.Controls.Styles defines import ProgressBarStyle , and QtCreator is I can not find any syntax errors ... so my object runtime But why is the wrong type given? After the text itemprop = "text"> you should use as the property type: import QtQuick 2.2 Import QtQuick.Controls 1.2 Impor...