You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
888 B

10 years ago
#include "Feature.h"
10 years ago
#include "ApplicationCtx.h"
10 years ago
#include <libevm/VM.h>
#include <QMessageBox>
#include <QDebug>
using namespace dev;
Feature::Feature()
{
}
void Feature::addContentOn(QObject* tabView) {
try{
if (tabUrl() == "")
return;
QVariant returnValue;
QQmlComponent* component = new QQmlComponent(
10 years ago
ApplicationCtx::GetInstance()->appEngine(),
QUrl(this->tabUrl()), tabView);
10 years ago
QMetaObject::invokeMethod(tabView, "addTab",
Q_RETURN_ARG(QVariant, returnValue),
Q_ARG(QVariant, this->title()),
Q_ARG(QVariant, QVariant::fromValue(component)));
m_view = qvariant_cast<QObject*>(returnValue);
10 years ago
10 years ago
}
catch (dev::Exception const& exception){
qDebug() << exception.what();
}
}