• Skip to content
  • Skip to link menu
KDE API Documentation - contactlistqml.cpp Source File (KPeople)
  • KDE Home
  • Contact Us
 

KPeople

  • frameworks
  • kpeople
  • examples
contactlistqml.cpp
1 /*
2  Persons Model Example
3  Copyright (C) 2012 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 #include <KApplication>
20 #include <KCmdLineArgs>
21 #include <KDebug>
22 #include <QDeclarativeView>
23 #include <qdeclarativeerror.h>
24 
25 #include <kdeclarative.h>
26 
27 int main(int argc, char **argv)
28 {
29  KCmdLineArgs::init(argc, argv, QByteArray("sweetpeople"), "", ki18n("SweetPeople - KPeople Example"), "0.1");
30 
31  KApplication app;
32 
33  QDeclarativeView view;
34  KDeclarative decl;
35  decl.setDeclarativeEngine(view.engine());
36  decl.initialize();
37  decl.setupBindings();
38  view.setSource(QUrl("qrc:/qml/Main.qml"));
39  view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
40  kDebug() << view.errors();
41  view.show();
42 
43  app.exec();
44 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Fri Feb 13 2015 15:16:39 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KPeople

Skip menu "KPeople"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List

Class Picker

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal