1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
<title>Qt 4.6: main.cpp Example File (graphicsview/flowlayout/main.cpp)</title>
7
<link href="classic.css" rel="stylesheet" type="text/css" />
10
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
13
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="functions.html"><font color="#004faf">All Functions</font></a> · <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">main.cpp Example File<br /><span class="small-subtitle">graphicsview/flowlayout/main.cpp</span>
15
<pre><span class="comment"> /****************************************************************************
17
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
18
** All rights reserved.
19
** Contact: Nokia Corporation (qt-info@nokia.com)
21
** This file is part of the examples of the Qt Toolkit.
23
** $QT_BEGIN_LICENSE:LGPL$
25
** Licensees holding valid Qt Commercial licenses may use this file in
26
** accordance with the Qt Commercial License Agreement provided with the
27
** Software or, alternatively, in accordance with the terms contained in
28
** a written agreement between you and Nokia.
30
** GNU Lesser General Public License Usage
31
** Alternatively, this file may be used under the terms of the GNU Lesser
32
** General Public License version 2.1 as published by the Free Software
33
** Foundation and appearing in the file LICENSE.LGPL included in the
34
** packaging of this file. Please review the following information to
35
** ensure the GNU Lesser General Public License version 2.1 requirements
36
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
38
** In addition, as a special exception, Nokia gives you certain additional
39
** rights. These rights are described in the Nokia Qt LGPL Exception
40
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
42
** GNU General Public License Usage
43
** Alternatively, this file may be used under the terms of the GNU
44
** General Public License version 3.0 as published by the Free Software
45
** Foundation and appearing in the file LICENSE.GPL included in the
46
** packaging of this file. Please review the following information to
47
** ensure the GNU General Public License version 3.0 requirements will be
48
** met: http://www.gnu.org/copyleft/gpl.html.
50
** If you have questions regarding the use of this file, please contact
51
** Nokia at qt-info@nokia.com.
54
****************************************************************************/</span>
56
#include <QtGui>
57
#include "window.h"
59
int main(int argc, char **argv)
61
QApplication app(argc, argv);
64
QGraphicsView *view = new QGraphicsView(&scene);
65
Window *w = new Window;
67
view->resize(400, 300);
71
<p /><address><hr /><div align="center">
72
<table width="100%" cellspacing="0" border="0"><tr class="address">
73
<td width="40%" align="left">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
74
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
75
<td width="40%" align="right"><div align="right">Qt 4.6.2</div></td>
76
</tr></table></div></address></body>