1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
/*
Persons Model Example
SPDX-FileCopyrightText: 2012 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include <QApplication>
#include <QDebug>
#include <persondata.h>
#include <widgets/persondetailsview.h>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
if (app.arguments().count() < 2) {
qWarning() << "Missing argument: \"" << qPrintable(app.arguments().at(0)) << " <contact id>\"";
return 1;
}
KPeople::PersonData *person = new KPeople::PersonData(app.arguments().last());
KPeople::PersonDetailsView w;
w.setPerson(person);
w.show();
app.exec();
}
|