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
|
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc
** All rights reserved.
** For any questions to Digia, please use the contact form at
** http://www.qt.io
**
** This file is part of Qt Enterprise Embedded.
**
** Licensees holding valid Qt Enterprise licenses may use this file in
** accordance with the Qt Enterprise License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** the contact form at http://www.qt.io
**
****************************************************************************/
/*!
\page qtee-customization.html
\title Customization
\previouspage qtee-building-and-running.html
\nextpage qtee-custom-embedded-linux-image.html
\section1 Environment and Input
By default, the basic environment variables and startup options of
\B2Q applications are set in the file \c
{/system/bin/appcontroller.conf} in embedded Android devices and
in \c{/etc/appcontroller.conf} in embedded Linux devices.
You can customize this file if you target a hardware device that
has other input devices than the ones that the \B2Q stack is configured
for by default.
On some devices, the root file system (where this file
resides) is mounted read-only at boot time. To allow modification,
remount it read-write by entering the following command:
\badcode
<INSTALL_DIR>/Tools/b2qt/adb remount
\endcode
In the \c{appcontroller.conf} file, the input devices are
specified by the lines similar to these:
\badcode
env=QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0
\endcode
Usually, you do not need to change this setting. USB input devices, such as
keyboards and mice, are automatically recognized. The mouse pointer is shown
automatically if a mouse is connected.
However, hotplugging may not work, which means that the input
devices, such as a keyboard and mouse, have to be connected at boot
time.
On some devices, for example the BD-SL-i.MX6, the touchscreen device is
specified explicitly with \c QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS. This is
necessary because the automatic device discovery would fail to find the
touchscreen.
\section1 Booting to a Custom Application
After you have deployed your own application to the device, it will be
launched on boot, instead of the \B2Q demo launcher. To prevent this
behavior, remove or disable the \b {Make this application the default one}
step from the \b{Run Settings} for your project in the Qt Creator \b Projects
mode.
To remove your application from the default startup, use the following
command:
\badcode
<INSTALL_DIR>/Tools/b2qt/adb shell appcontroller --remove-default
\endcode
\section1 Switching Between Portrait and Landscape Views
Depending on device screen dimensions and application requirements, it might
be desirable
to change the default view orientation. The following example shows how to rotate your
application in QML.
\qml
import QtQuick 2.2
Item {
id: root
width: 800
height: 1280
// Container element for rotating
Rectangle {
id: main
// Swap the width and height of the root item
width: root.height
height: root.width
anchors.centerIn: parent
// Rotate 90 degrees clockwise around transformOrigin
rotation: 90
// The rotated content
Text {
text: qsTr("Hello World")
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}
}
\endqml
\section1 Disabling Screen Composer on Embedded Android
By default, the \B2Q stack uses Android's screen composer, \e
Surfaceflinger. It is required for Qt Multimedia functionality,
i.e. video playback and camera. If that functionality is not
required, Surfaceflinger may be disabled. This can in some
situations improve performance.
\list 1
\li Edit \c {/system/bin/appcontroller.conf} to set the value of
the environment variable \c QT_QPA_EGLFS_NO_SURFACEFLINGER to \c
1 instead of \c 0.
\li Disable the startup of \c surfaceflinger at boot-up. Either
change \c /init.rc, or simply rename the \c
{/system/bin/surfaceflinger} executable.
\endlist
\section1 Using Network Connection for ADB
By default, \B2Q uses USB cable for communication between device and Qt Creator.
On \B2QL, you can change the device to use ethernet network connection for the
communication. To enable network connection, you need to modify file
\c /etc/default/adbd located on the devices, and change value of \c USE_ETHERNET
to \c 'yes'. This can also be done with \c adb, while the device is still
connected via USB.
\badcode
<INSTALL_DIR>/Tools/b2qt/adb shell sed -i -e 's/USE_ETHERNET=no/USE_ETHERNET=yes/' /etc/default/adbd
\endcode
\note You need to restart the device for this change to take effect.
\include b2qt-post-install-setup.qdocinc configuring network device
*/
|