Hi!
There are no error’s or warnings but the adbanner is not visible on the screen.I have tried setting “visible:true”, but it still doesn’t work.I have tried setting position of the adobject in the c++ code using the setPos() function but it causes an error on android saying “unfortunately the app has stopped working”.Any suggestions will be appriciated.
//c++ code
QGraphicsScene *start_screen = new QGraphicsScene();
QGraphicsView *view = new QGraphicsView(start_screen);
QQmlEngine *engine = new QQmlEngine;
QQmlComponent component(engine, QUrl::fromLocalFile("admob.qml"));
QGraphicsObject *adobject = qobject_cast<QGraphicsObject *>(component.create());
start_screen->addItem(adobject);
//admob.qml file:
import Felgo 3.0
import QtQuick 2.0
AdMobBanner {
adUnitId: "ca-app-pub-3940256099942544/6300978111"
testDeviceIds: [ "8B13477C884FE02E65323XXXXXXXXXX" ]
banner: AdMobBanner.Smart
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
}