1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
**
**
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page qt-embedded-running.html
\title Running Qt for Embedded Linux Applications
\ingroup qt-embedded-linux
A \l{Qt for Embedded Linux} application requires a server application to be
running, or to be the server application itself. Any \l{Qt for Embedded Linux}
application can be the server application by constructing the QApplication
object with the QApplication::GuiServer type, or by running the application
with the \c -qws command line option.
Applications can run using both single and multiple displays, and
various command line options are available.
Note that this document assumes that you either are using the
\l{The Virtual Framebuffer} or that you are running \l{Qt for Embedded Linux}
using the \l {The VNC Protocol and Qt for Embedded Linux}{VNC} protocol,
\e or that you have the Linux framebuffer configured
correctly and that no server process is running. (To test that the
Linux framebuffer is set up correctly, use the program provided by
the \l {Testing the Linux Framebuffer} document.)
\tableofcontents
\section1 Using a Single Display
To run the application using a single display, change to a Linux
console and select an application to run, e.g. \l {Text
Edit}{demos/textedit}. Run the application with the \c -qws
option:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 0
\table 100%
\row
\o
Provided that the environment variables are adjusted properly
during the \l {Installing Qt on Embedded Linux}{installation process}, you
should see the \l {Text Edit} demo appear.
It might be that the hardware drivers must be specified explicitly
to make everything work properly. For more information, please
consult the following documentation:
\list
\o \l{Qt for Embedded Linux Pointer Handling}{Pointer Handling}
\o \l{Qt for Embedded Linux Character Input}{Character Input}
\o \l{Qt for Embedded Linux Display Management}{Display Management}
\endlist
\o
\inlineimage qt-embedded-runningapplication.png
\endtable
Additional applications can be run as clients, i.e., by running
these applications \e without the \c -qws option they will connect
to the existing server as clients. You can exit the server
application at any time using \gui{Ctrl+Alt+Backspace}.
\section1 Using Multiple Displays
Qt for Embedded Linux also allows multiple displays to be used
simultaneously. There are two ways of achieving this: Either run
multiple Qt for Embedded Linux server processes, or use the
ready-made \c Multi screen driver.
When running multiple server processes, the screen driver (and
display number) must be specified for each process using the \c
-display command line option or by setting the QWS_DISPLAY
environment variable. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 1
See the \l {Qt for Embedded Linux Display Management}{display management}
documentation for more details on how to specify a screen
driver. Note that you must also specify the display (i.e., server
process) when starting client applications:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 2
There is no way of moving a client from one display to another
when running multiple server processes. Using the \c Multi screen
driver, on the other hand, applications can easiliy be moved
between the various screens.
The \c Multi screen driver can be specified just like any other
screen driver by using the \c -display command line option or by
setting the QWS_DISPLAY environment variable. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 3
See the \l {Qt for Embedded Linux Display Management}{display management}
documentation for details regarding arguments.
\section1 Command Line Options
\table 100%
\header
\o Option \o Description
\row
\o \bold -fn <font>
\o
Defines the application font. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 4
The font should be specified using an X logical font description.
\row
\o \bold -bg <color>
\o
Sets the default application background color. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 5
The color-name must be one of the names recognized by the QColor constructor.
\row
\o \bold -btn <color> \o
Sets the default button color. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 6
The color-name must be one of the names recognized by the QColor constructor.
\row
\o \bold -fg <color> \o
Sets the default application foreground color. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 7
The color-name must be one of the names recognized by the QColor constructor.
\row
\o \bold -name <objectname> \o
Sets the application name, i.e. the application object's object name. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 8
\row
\o \bold -title <title> \o
Sets the application's title. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 9
\row
\o \bold -geometry <width>x<height>+<Xoffset>+<Yoffset> \o
Sets the client geometry of the first window that is shown. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 10
\row
\o \bold -keyboard \o
Enables the keyboard.
See also: \l {Qt for Embedded Linux Character Input}.
\row
\o \bold -nokeyboard \o
Disables the keyboard.
\row
\o \bold -mouse \o
Enables the mouse cursor.
See also: \l {Qt for Embedded Linux Pointer Handling}.
\row
\o \bold -nomouse \o
Disables the mouse cursor.
\row
\o \bold -qws \o
Runs the application as a server application, i.e. constructs a
QApplication object of the QApplication::GuiServer type.
\row
\o \bold -display \o
Specifies the screen driver.
See also: \l {Qt for Embedded Linux Display Management}.
\row
\o \bold -decoration <style>\o
Sets the application decoration. For example:
\snippet doc/src/snippets/code/doc_src_emb-running.qdoc 11
The supported styles are \c windows, \c default and \c styled.
See also QDecoration.
\endtable
*/
|