Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

QML not show string that return from Q_INVOKABLE method

$
0
0
i have a problem whit QML: in my situation i have 3 level of QML: main.qlm-> ListMeteoLocale.qml ->MeteoGiornaliero.qml inside this i invoke a cpp class for set a label text whit this method Interface.interfacciaMeteoLocale("test") inside “ListMeteoLocale” run correctly but not in “MeteoGiornaliero” where is the problem? main.qml // Tabbed Pane project template import bb.cascades 1.0   TabbedPane {     Tab {         title: qsTr("Home")         NavigationPane {             id: naviHome             Page {                 ListMeteoLocale {                                     }             }         }     } onCreationCompleted: {         // this slot is called when declarative scene is created         // write post creation initialization here         console.log("TabbedPane - onCreationCompleted()")           // enable layout to adapt to the device rotation         // don't forget to enable screen rotation in bar-bescriptor.xml (Application->Orientation->Auto-orient)         OrientationSupport.supportedDisplayOrientation = SupportedDisplayOrientation.All;     }     showTabsOnActionBar: true } ListMeteoLocale.qml import bb.cascades 1.0   Container {       background: Color.Cyan     Label {         text: Interface.interfacciaMeteoLocale("test") // this call run correctly            }     ListView {         id: listViewLocale                 listItemComponents: [             ListItemComponent {                 id: listComponent                 type: "listItem"                 MeteoGiornaliero {                 }             }         ]         dataModel: ArrayDataModel {             id: arrayMeteoGiornaliero             objectName: "arrayMeteoGiornaliero"         }                 function itemType(data, indexPath) {                 return "listItem";             }     } } MeteoGiornaliero.qml import bb.cascades 1.0   Container {     id: meteoGiornaliero     background: Color.Blue         Label {         text: Interface.interfacciaMeteoLocale("dnksandjksa") // this call not run         textStyle.color: Color.White     }   } why in MeteoGiornaliero not run this method

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>