source: trunk/doc/html/emb-running.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 5.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/doc/qws.doc:337 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>Running Qt/Embedded applications</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>Running Qt/Embedded applications</h1>
33
34
35<p> A Qt/Embedded application requires a master application to be running
36or to be a master application itself. The master application is
37primarily responsible for managing top-level window regions, and
38pointer and keyboard input.
39<p> Any Qt/Embedded application can be a master application by
40constructing the <a href="qapplication.html">QApplication</a> object with the
41<em>QApplication::GuiServer</em> type, or by being run with the <em>-qws</em>
42command line option.
43<p> This document assumes you have the Linux framebuffer configured correctly
44and no master process is running. If you do not have a working Linux
45framebuffer you can use the
46<a href="emb-qvfb.html">Qt/Embedded virtual framebuffer</a>, or you can
47run Qt/Embedded as a <a href="emb-vnc.html">VNC server</a>.
48<p> Change to a Linux console and select an example to run, e.g. <tt>examples/widgets</tt>. Make sure $QTDIR is set to the directory where you
49installed Qt/Embedded and add the $QTDIR/lib directory to
50$LD_LIBRARY_PATH, e.g.:
51<pre>
52export QTDIR=$HOME/qt-VERSION
53export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
54</pre>
55
56<p> Run the application with the <em>-qws</em> option:
57<p> <pre>
58cd $QTDIR/examples/widgets
59./widgets -qws
60</pre>
61
62<p> You should see the <tt>widgets</tt> example appear. If your mouse doesn't
63work correctly you must specify the type of mouse to use. You can
64exit the master application at any time using
65<b>Ctrl+Alt+Backspace</b>.
66<p> If you wish to run additional applications you should run them as clients
67i.e. without the <em>-qws</em> option.
68<p> <h2> Displays
69</h2>
70<a name="1"></a><p> Qt/Embedded allows multiple displays to be used simultaneously by running
71multiple Qt/Embedded master processes. This is achieved using the -display
72command line parameter or the $QWS_DISPLAY environment variable.
73<p> The -display parameter's syntax is:
74<pre>
75 [gfx driver][:driver specific options][:display number]
76</pre>
77
78For example, if you want to use the mach64 driver on fb1 as display 2:
79<pre>
80 $ ./launcher -display Mach64:/dev/fb1:2
81</pre>
82
83<p> To try this functionality you can do the following:
84<ol type=1>
85<li> Change to VC 1 (virtual console one) and run the launcher:
86<p> <pre>
87 $ cd examples/launcher
88 $ ./launcher
89</pre>
90
91<p> <li> Switch to VC 2 and run another one:
92<p> <pre>
93 $ cd examples/launcher
94 $ ./launcher -display :1
95</pre>
96
97<p> Another launcher will be started. Start an application in this launcher.
98<p> <li> Press <b>Ctrl+Alt+F1</b> - back to display 0. You can also start
99additional applications on a particular display by specifying the
100display id. Change to VC 3:
101<p> <pre>
102 $ cd examples/widgets
103 $ ./widgets -display :1
104</pre>
105
106<p> will display the widgets example on dislpay :1 (VC 2).
107</ol>
108<p> Only the master process needs to specify the driver/device part
109explicitly. The clients get the information they need from the master
110when they connect. So once you have a master server running using a
111particular driver, you can just use "client -display :n" to use
112display n.
113<p> <h2> Mouse Input
114</h2>
115<a name="2"></a><p> Qt/Embedded attempts to autodetect a mouse by default. The supported
116protocols are MouseMan, Microsoft, IntelliMouse and
117some other devices specific to certain hardware (e.g. Vr touch panel).
118To specify the mouse to use set the <tt>$QWS_MOUSE_PROTO</tt> environment
119variable, e.g.:
120<pre>
121export QWS_MOUSE_PROTO=IntelliMouse
122</pre>
123
124<p> The mouse autodetection opens the serial devices and psaux which
125may cause conflicts with other programs using those devices. If
126this is the case then specify the mouse driver protocol and device
127explicitly.
128<p> <p>See also <a href="emb-pointer.html">Qt/Embedded Pointer Handling</a>.
129
130<p>
131<!-- eof -->
132<p><address><hr><div align=center>
133<table width=100% cellspacing=0 border=0><tr>
134<td>Copyright &copy; 2007
135<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
136<td align=right><div align=right>Qt 3.3.8</div>
137</table></div></address></body>
138</html>
Note: See TracBrowser for help on using the repository browser.