Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

[SOLVED] BlackBerry 10 - Error QML " Expected token `;’ "

$
0
0
i don’t know the problem because some tutorial of Qt using this simple method to write a dinamic string: QML is a simple container: Container {     id: meteoGiornaliero     preferredHeight: 75     background: Color.Blue         Label {         text: interface.interfacciaMeteoLocale("dnksandjksa") // error Expected token `;'         textStyle.color: Color.White     }   } in my Cpp i register class like this  QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);     AbstractPane *root = qml->createRootObject<AbstractPane>();     // set created root object as a scene     appl->setScene(root);     cout << "Lancio Parsing"<< endl;   //    QmlDocument *qmlList = QmlDocument::create("asset:///MeteoGiornaliero.qml").parent(this);     qml->setContextProperty("interface", InterfacciaDataModel::instance()); the class InterfacciaDataModel is correct because the method declarated whit macro Q_INVOKABLE class InterfacciaDataModel: public QObject {  Q_OBJECT public:  static InterfacciaDataModel* instance();  virtual ~InterfacciaDataModel();  MeteoLocale* mappaMeteo;  QList<MeteoLocale*> calListaInteressata(QString path);    Q_INVOKABLE QString interfacciaMeteoLocale(QString path);   private :  static InterfacciaDataModel* s_instance;  InterfacciaDataModel(); }; this error is very unusually because the error is not for sintax error, the IDE when building can’t know the Interface and can’t know if existing a problem. i think that the problem is some import or sonting like this… anyone can help me???

Viewing all articles
Browse latest Browse all 4972

Trending Articles