How to dynamic create inneractiveAD in QML ?
Can anybody help me?
If I don't use dynamic create inneractiveAD, it can work. [xxx_xxx_OVI is belong to my applicationId]
The code as below.
AdItem {
parameters: AdParameters {
applicationId: "xxx_xxx_OVI"
}
x: screen.height > screen.width ? 60 : 392
y: screen.height > screen.width ? 300 : 45
width: 240
height: 80
hideOnClick: true
scaleAd: true
}
And then I want [B]dynamic create inneractiveAD as below[/B], but I [B]cannot [/B]see inneractiveAD display. (put code in Component.onCompleted)
var [B]newObject0 [/B]= Qt.createQmlObject('import QtQuick 1.1; import com.nokia.symbian 1.1; Rectangle {color: "red"; width: 20; height: 20}',
mainPage, "dynamicSnippet1");
var [B]newObject1 [/B]= Qt.createQmlObject('import QtQuick 1.1; import com.nokia.symbian 1.1; import "inneractive"; AdItem { parameters: AdParameters { applicationId: "xxx_xxx_OVI"; }; x: 0; y: 40; width: 240; height: 80; hideOnClick: true; scaleAd: true;}',
mainPage, "dynamicSnippet1");
newObject0 is dynamic created OK.
but newObject1 is dynamic created, but not see the AD.
Have anybody try this method?
Thank you very much.