Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 705

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/doc/qws.doc:311 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Running Qt/Embedded applications</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<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>

 
<p> A Qt/Embedded application requires a master application to be running
or to be a master application itself.  The
master application is primarily responsible for managing top-level window
regions, and pointer and keyboard input.
<p> Any Qt/Embedded application can be a
master application by constructing the <a href="qapplication.html">QApplication</a> object with the
<em>QApplication::GuiServer</em> type, or running the application with the
<em>-qws</em> command line option.
<p> This document assumes you have the Linux framebuffer configured correctly
and no master process is running.  If you do not have a working Linux
framebuffer you can use the
<a href="emb-qvfb.html">Qt/Embedded virtual framebuffer</a>, or you can
run Qt/Embedded as a <a href="emb-vnc.html">VNC server</a>.
<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 installed Qt/Embedded
and add the $QTDIR/lib directory to $LD_LIBRARY_PATH, e.g.:
<pre>
export QTDIR=$HOME/qt-VERSION
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
</pre>
 
<p> Run the application with the <em>-qws</em> option:
<p> <pre>
cd $QTDIR/examples/widgets
./widgets -qws
</pre>
 
<p> You should see the widgets example appear.  If your mouse doesn't work
correctly you need to specify the type of mouse to use.
You can exit the master application at any time using <b>Ctrl+Alt+Backspace</b>.
<p> If you wish to run additional applications you should run them as clients
i.e. without the <em>-qws</em> option.
<p> <h2> Displays
</h2>
<a name="1"></a><p> Qt/Embedded allows multiple displays to be used simultaneously by running
multiple Qt/Embedded master processes.  This is achieved using the -display
command line parameter or the $QWS_DISPLAY environment variable.
<p> The -display parameter's syntax is:
<pre>
    [gfx driver][:driver specific options][:display number]
</pre>
 
for example if you want to use the mach64 driver on fb1 as display 2:
<pre>
    $ ./launcher -display Mach64:/dev/fb1:2
</pre>
 
<p> To try this functionality you can do the following:
<ol type=1>
<li> Change to VC 1 and run the launcher:
<p> <pre>
    $ cd examples/launcher
    $ ./launcher
</pre>
 
<p> <li> Switch to VC 2 and run another one:
<p> <pre>
    $ cd examples/launcher
    $ ./launcher -display :1
</pre>
 
<p> Another launcher will be started.  Start an application in this launcher.
<p> <li> Press <b>Ctrl+Alt+F1</b> - back to display 0.  You can also start additional
applications on a particular display by specifying the display id. Change
to VC 3:
<p> <pre>
    $ cd examples/widgets
    $ ./widgets -display :1
</pre>
 
<p> will display the widgets example on dislpay :1 (VC 2).
</ol>
<p> Only the master process needs to specify the driver/device part explicitly.
The clients get the information they need from the master when they connect.
So once you have a master server running using a particular driver, you can
just use "client -display :n" to use display n.
<p> <h2> Mouse Input
</h2>
<a name="2"></a><p> At the time of writing Qt/Embedded supports MouseMan (default), Microsoft,
IntelliMouse and some other devices specific to certain hardware (e.g. Vr
touch panel).  To specify the mouse to use set the $QWS_MOUSE_PROTO environment
variable, e.g.:
<pre>
export QWS_MOUSE_PROTO=IntelliMouse
</pre>
 
<p> <p>See also <a href="emb-pointer.html">Qt/Embedded Pointer Handling</a>.

<p> 
<!-- eof -->
<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>