source: trunk/doc/src/examples/activeqt/webbrowser.qdoc

Last change on this file was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 2.9 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation (qt-info@nokia.com)
6**
7** This file is part of the documentation of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:FDL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in a
14** written agreement between you and Nokia.
15**
16** GNU Free Documentation License
17** Alternatively, this file may be used under the terms of the GNU Free
18** Documentation License version 1.3 as published by the Free Software
19** Foundation and appearing in the file included in the packaging of this
20** file.
21**
22** If you have questions regarding the use of this file, please contact
23** Nokia at qt-info@nokia.com.
24** $QT_END_LICENSE$
25**
26****************************************************************************/
27
28/*!
29 \example activeqt/webbrowser
30 \title Web Browser Example (ActiveQt)
31
32 The Web Browser example uses the Microsoft Web Browser
33 ActiveX control to implement a fully functional Web Browser
34 application. The user interface has been developed using the Qt
35 Designer integration of the QAxWidget class.
36
37 The code demonstrates how the Qt application can communicate
38 with the embedded ActiveX controls using signals, slots and the
39 dynamicCall() function.
40
41 \snippet examples/activeqt/webbrowser/main.cpp 0
42
43 The \c MainWindow class declares a \c QMainWindow based user interface,
44 using the \c Ui::MainWindow class generated by Qt Designer. A number
45 of slots are implemented to handle events from the various user
46 interface elements, including the \c WebBrowser object, which is a
47 QAxWidget hosting the Microsoft Web Browser control.
48
49 \snippet examples/activeqt/webbrowser/main.cpp 1
50
51 The constructor initializes the user interface, installs a
52 progress bar on the status bar, and uses QAxBase::dynamicCall()
53 to invoke the \c GoHome() method of Internet Explorer to
54 navigate to the user's home page.
55
56 \snippet examples/activeqt/webbrowser/main.cpp 2
57 Different slots handle the signals emitted by the WebBrowser object.
58
59 Connections that don't require any coding, i.e. connecting the \c back
60 action to the \c GoBack() slot, have already been made in Qt Designer.
61
62 \snippet examples/activeqt/webbrowser/main.cpp 3
63 \snippet examples/activeqt/webbrowser/main.cpp 4
64
65 The rest of the implementation is not related to ActiveQt - the actions
66 are handled by different slots, and the entry point function starts the
67 application using standard Qt APIs.
68
69 To build the example you must first build the QAxContainer
70 library. Then run your make tool in \c
71 examples/activeqt/webbrowser and run the resulting \c
72 webbrowser.exe.
73*/
Note: See TracBrowser for help on using the repository browser.