Hahaha, should I look up your entire code? :P
There is a good tutorial and good examples from inneractive. I simply copied the code to show the banner and it worked.
Do you get some error messages? Can you compile your project? Maybe you forgot or you don't wrote the right app key and token in your app. Then you don't see the banner.
Edit: I can't find any code where you place the banner in your files.
1. You have to add this headers:
#include "InnerActiveAd/InnerActiveAdModule.h"
#include "InnerActiveAd/InnerActiveAdWidget.h"
2. The I inserted the inneractive code by initialising the class:
Code:
///////////////////////////////////////////////////////////////
// create InnerActive Ad Module
ipAdModule = new InnerActiveAdModule(this, "NAME OF YOUR APP - ID", 180);
ipAdModule->setAdProtocolParameter(EIaProtocolParams_DistributionChannelPortal, QString("551"));
connect(ipAdModule, SIGNAL(adDataReady()), this, SLOT(onAdDataReady()));
ipAdWidget = ipAdModule->createAdBanner(parent);
ipAdWidget->setGeometry(165, 74, 310, 52);
ipAdWidget->setObjectName(QLatin1String("adCtrl"));
ipAdWidget->setFocusPolicy(Qt::NoFocus);
//ipAdWidget->hide();
int res = ipAdModule->requestAd();
Q_UNUSED(res);
3. write the event function (adDataReady()):
Code:
void Cams::onAdDataReady(void)
{
int res = ipAdModule->updateBanner(ipAdWidget);
switch (res)
{
case EIaErrors_AdDataNotReady:
QMessageBox::information(this, tr("InnerActive"), tr("Ad data not ready. Ad should be reloaded."));
break;
case EIaErrors_Processing:
QMessageBox::information(this, tr("InnerActive"), tr("Retrieving Ad data. Try again later."));
break;
case EIaErrors_Ok:
{
if(ipAdWidget->isHidden())
ipAdWidget->show();
}
break;
default:
break;
}
}
That's all.