aboutsummaryrefslogtreecommitdiffstats
path: root/qmlpage.cpp
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2013-10-14 22:22:22 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2013-10-14 22:22:22 +0000
commit3adc7ee78033c4ad2be32a8bf38d0971c7eb30d5 (patch)
treea2ebfb740e0ef741bc076d74a6b6dc69c5deb136 /qmlpage.cpp
parentupdated TODO (diff)
downloadgpg4usb-3adc7ee78033c4ad2be32a8bf38d0971c7eb30d5.tar.gz
gpg4usb-3adc7ee78033c4ad2be32a8bf38d0971c7eb30d5.zip
add keyinforow qml widget
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@1060 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'qmlpage.cpp')
-rw-r--r--qmlpage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qmlpage.cpp b/qmlpage.cpp
index 5d49f5d..64a8640 100644
--- a/qmlpage.cpp
+++ b/qmlpage.cpp
@@ -18,13 +18,15 @@ QMLPage::QMLPage(KgpgCore::KgpgKey key, QWidget *parent) :
QDeclarativeView *qmlView = new QDeclarativeView;
qmlView->setResizeMode(QDeclarativeView::SizeRootObjectToView);
- qmlView->setSource(QUrl("qrc:/qml/keydetails.qml"));
+
context = qmlView->rootContext();
context->setContextProperty("id", key.id());
context->setContextProperty("email", key.email());
context->setContextProperty("name", key.name());
+ qmlView->setSource(QUrl("qrc:/qml/keydetails.qml"));
+
/*
or: http://xizhizhu.blogspot.de/2010/10/hybrid-application-using-qml-and-qt-c.html
DeclarativePropertyMap map;