You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/html/emb-running.html

139 lines
5.2 KiB

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/doc/qws.doc:337 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Running TQt/Embedded applications</title>
<style type="text/css"><!--
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 TQt/Embedded applications</h1>
<p> A TQt/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 TQt/Embedded application can be a master application by
constructing the <a href="ntqapplication.html">TQApplication</a> object with the
<em>TQApplication::GuiServer</em> type, or by being run 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-tqvfb.html">TQt/Embedded virtual framebuffer</a>, or you can
run TQt/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 $TQTDIR is set to the directory where you
installed TQt/Embedded and add the $TQTDIR/lib directory to
$LD_LIBRARY_PATH, e.g.:
<pre>
export TQTDIR=$HOME/qt-VERSION
export LD_LIBRARY_PATH=$TQTDIR/lib:$LD_LIBRARY_PATH
</pre>
<p> Run the application with the <em>-qws</em> option:
<p> <pre>
cd $TQTDIR/examples/widgets
./widgets -qws
</pre>
<p> You should see the <tt>widgets</tt> example appear. If your mouse doesn't
work correctly you must 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> TQt/Embedded allows multiple displays to be used simultaneously by running
multiple TQt/Embedded master processes. This is achieved using the -display
command line parameter or the $TQWS_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 (virtual console one) 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> TQt/Embedded attempts to autodetect a mouse by default. The supported
protocols are MouseMan, Microsoft, IntelliMouse and
some other devices specific to certain hardware (e.g. Vr touch panel).
To specify the mouse to use set the <tt>$TQWS_MOUSE_PROTO</tt> environment
variable, e.g.:
<pre>
export TQWS_MOUSE_PROTO=IntelliMouse
</pre>
<p> The mouse autodetection opens the serial devices and psaux which
may cause conflicts with other programs using those devices. If
this is the case then specify the mouse driver protocol and device
explicitly.
<p> <p>See also <a href="emb-pointer.html">TQt/Embedded Pointer Handling</a>.
<p>
<!-- eof -->
<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>