Difference between revisions of "How to build and use an SDK for QT"

[quality revision] [quality revision]
m (QT image and SDK with EGLFS)
m (remove diff-style line change)
 

The OpenSTLinux distribution offers the possibility to generate examples of enables the generation of example images based on the QT framework (st-example-image-qt and, for ecosystem release ≥ v2.1.0 More info.png , st-example-image-qtwayland) as demonstratorsfor demonstration purposes, not for developing products.

This article provides information on how to create the SDK for building QT applications based on the above example images above.

1 Prerequisites[edit]

Being Be able to rebuild an OpenSTLinux image

2 OpenSTLinux QT images and SDK[edit]

OpenSTLinux distribution provides two examples of images based on the QT framework:

  • st-example-image-qtwayland (requires 'openstlinux-weston' distro and ecosystem release ≥ v2.1.0 More info.png ); : thanks to weston window management, QT applications are displayed in independent windows and can coexist on the same screen with other non-QT applications;

To build the images and the associated SDK, the first step requires installing install the OpenSTLinux distribution through the steps listed by following the procedure described in chapter Installing the OpenSTLinux distribution.

2.1 QT image and SDK with weston/wayland[edit]

This The QT image and SDK will use QTwayland backend back-end to run QT applications in independent windows managed by weston. It This requires ecosystem release ≥ v2.1.0 More info.png .

Initialize the OpenEmbedded build environment for the openstlinux-weston distro:

 DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh

Read and read and accept EULA. Further details are available in Refer to Initializing the OpenEmbedded build environment for further details.

Then build the image and the SDK:

 bitbake st-example-image-qtwayland
 bitbake st-example-image-qtwayland -c populate_sdk

Further details are available in Refer to Generating your own Starter and Developer Packages and How to create an SDK for OpenSTLinux distribution for further details.

Note: the legacy command bitbake meta-toolchain-qt5 is not suggested recommended because the resulting SDK would miss some target packages.

The image can be flashed on the target board as in Flashing the built image.

The generated SDK is available in folder the tmp-glibc/deploy/sdk/ folder. It can be installed as described in Run the SDK installation script, with using the following command:

 ./tmp-glibc/deploy/sdk/st-example-image-qtwayland-openstlinux-weston-stm32mp1-x86_64-toolchain-3.1-snapshot.sh -y -d <working directory absolute path>/Developer-Package/SDK

2.2 QT image and SDK with EGLFS[edit]

This The QT image and SDK will use QT backend back-end to run a single QT applications in fullscreen full-screen mode.

Initialize the OpenEmbedded build environment for the openstlinux-eglfs distro:

 DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh

Read and read and accept EULA. Further details are available in Refer to Initializing the OpenEmbedded build environment for further details.

Then build the image and the SDK:

 bitbake st-example-image-qt
 bitbake st-example-image-qt -c populate_sdk

Further details are available in Refer to Generating your own Starter and Developer Packages and How to create an SDK for OpenSTLinux distribution for further details.

Note: the legacy command bitbake meta-toolchain-qt5 is not suggested recommended because the resulting SDK would miss some target packages.

The image can be flashed on the target board as in Flashing the built image.

The generated SDK is available in folder the tmp-glibc/deploy/sdk/ folder. It can be installed as described in Run the SDK installation script, with using the following command:

 ./tmp-glibc/deploy/sdk/st-example-image-qt-openstlinux-eglfs-stm32mp1-x86_64-toolchain-3.1-snapshot.sh -y -d <working directory absolute path>/Developer-Package/SDK

2.2.1 Select Selecting the display resolution and size in EGLFS[edit]

When using a display that accepts multiple resolutions, it is possible to specify the preferred resolution can be specified by editing the board file /usr/share/qt5/cursor.json. For example, for an HDMI display, change the line

{ "name": "HDMI1", "mode": "1280x720" },

and enter one of the valid resolutions reported by the command

 modetest

If the current display resolution is higher than the resolution requested by the QT application, QT will expand expands the application to run it in full screen. This can produce blurred images on the display and can impact the system performance.

It is possible to configure QT The QT framework can be configured to use only one part of the overall display. For example, to use only an area of 400x300 pixels, add:

{ "name": "HDMI1", "mode": "1280x720", "size": "400x300" },

3 Configuring the QT configurationframework[edit]

By default, QT internal data uses use 64 bit bits per pixel (16 bit bits for each R, G, B , and A componentscomponent). It is possible to slightly improve the performance The performance can be slightly improved by forcing the QT framework to use 32 bit bits per pixel (8 bit bits for each component). This can be achieved by editing the file layers/meta-st/meta-st-openstlinux/recipes-qt/qt5/qtbase_git.bbappend before the build and replacing the line

-QT_CONFIG_FLAGS += " -no-sse2 -no-opengles3"
+

with

QT_CONFIG_FLAGS += " -no-sse2 -no-opengles3 -no-feature-raster-64bit"

Note: the above setup can produce visible artefacts , so and has to be evaluated on a case by case basis.

4 Build Building a QT application[edit]

Enter in Open the folder that contains the application, enable the QT SDK and compile the application:

 cd <path_of_app>
 . <install_path_sdk>/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
 qmake && make


The OpenSTLinux distribution offersenables the possibility to generate examples of generation of example images based on the [[QT overview|QT framework]] ([[OpenSTLinux distribution#Images|st-example-image-qt]] and, for {{EcosystemRelease | revision=2.1.0 | range=and after}}, [[OpenSTLinux distribution#Images|st-example-image-qtwayland]]) as demonstratorsfor demonstration purposes, not for developing products.

This article provides information on how to create the [[SDK for OpenSTLinux distribution|SDK]] for building QT applications based on the above example images above.

== Prerequisites ==
BeingBe able to rebuild an OpenSTLinux image

== OpenSTLinux QT images and SDK ==

OpenSTLinux distribution provides two examples of images based on the [[QT overview|QT framework]]:

* [[OpenSTLinux distribution#Images|st-example-image-qtwayland]] (requires '[[OpenSTLinux distribution#Distros|openstlinux-weston]]' distro and {{EcosystemRelease | revision=2.1.0 | range=and after}});: thanks to weston window management, QT applications are displayed in independent windows and can coexist on the same screen with other non-QT applications;

* [[OpenSTLinux distribution#Images|st-example-image-qt]] (requires '[[OpenSTLinux distribution#Distros|openstlinux-eglfs]]' distro);: only one QT application can access the screen and will be . It is displayed in full-screen mode.{{ReviewsComments|-- [[User:Jean-philippe Romain|Jean-philippe Romain]] ([[User talk:Jean-philippe Romain|talk]]) 17:55, 6 November 2020 (CET)<br />General remark, not sure "future"(will) to be used in wiki page?}}
{{ReviewsComments|-- [[User:Antonio Borneo|Antonio Borneo]] ([[User talk:Antonio Borneo|talk]]) 15:03, 12 November 2020 (CET)<br />I prefer to left the rephrasing to the technical writer}}

To build the images and the associated SDK, the first step requires installing install the OpenSTLinux distribution through by following the steps listedprocedure described in chapter [[STM32MP1 Distribution Package#Installing the OpenSTLinux distribution|Installing the OpenSTLinux distribution]].

=== QT image and SDK with weston/wayland ===
This The QT image and SDK will use QTwayland backendback-end to run QT applications in independent windows managed by weston. ItThis requires {{EcosystemRelease | revision=2.1.0 | range=and after}}.

Initialize the OpenEmbedded build environment for the [[OpenSTLinux distribution#Distros|openstlinux-weston]] distro:


 {{PC$}} DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
and read Read and accept EULA. Further details are available in Refer to [[STM32MP1 Distribution Package#Initializing the OpenEmbedded build environment|Initializing the OpenEmbedded build environment]] for further details.

Then build the image and the SDK:

 {{PC$}} bitbake st-example-image-qtwayland
 {{PC$}} bitbake st-example-image-qtwayland -c populate_sdk
Further details are available in Refer to [[STM32MP1 Distribution Package#Generating your own Starter and Developer Packages|Generating your own Starter and Developer Packages]] and [[How to create an SDK for OpenSTLinux distribution]] for further details.

'''Note:''' the legacy command '''bitbake meta-toolchain-qt5''' is not suggestedrecommended because the resulting SDK would miss some target packages.

The image can be flashed on the target board as in [[STM32MP1 Distribution Package#Flashing the built image|Flashing the built image]].

The generated SDK is available in folderthe '''tmp-glibc/deploy/sdk/''' folder. It can be installed as described in [[Install the SDK#Run the SDK installation script|Run the SDK installation script]], withusing the following command:


 {{PC$}} ./tmp-glibc/deploy/sdk/st-example-image-qtwayland-openstlinux-weston-stm32mp1-x86_64-toolchain-{{EcosystemRelease/Component | revision=2.0.0 | component=OpenEmbedded | name=short}}-snapshot.sh -y -d <working directory absolute path>/Developer-Package/SDK

=== QT image and SDK with EGLFS ==={{ReviewsComments|-- [[User:Jean-philippe Romain|Jean-philippe Romain]] ([[User talk:Jean-philippe Romain|talk]]) 17:55, 6 November 2020 (CET)<br />To be cross-check with integration team, but discussion ongoing to remove x11/eglfs from OpenSTLinux, see BZ95314}} {{ReviewsComments|-- [[User:Antonio Borneo|Antonio Borneo]] ([[User talk:Antonio Borneo|talk]]) 15:05, 12 November 2020 (CET)<br />No, the image eglfs ("naked", no X11 nor wayland) is not going to be removed. It is the image x11-over-eglfs that is already removed from the page [[OpenSTLinux distribution#Distros|openstlinux-eglfs]]}}
This image and SDK will use QT backend to run a 

The QT image and SDK use QT back-end to run single QT applications in fullscreenfull-screen mode.

Initialize the OpenEmbedded build environment for the [[OpenSTLinux distribution#Distros|openstlinux-eglfs]] distro:


 {{PC$}} DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
and read Read and accept EULA. Further details are available in Refer to [[STM32MP1 Distribution Package#Initializing the OpenEmbedded build environment|Initializing the OpenEmbedded build environment]] for further details.

Then build the image and the SDK:

 {{PC$}} bitbake st-example-image-qt
 {{PC$}} bitbake st-example-image-qt -c populate_sdk
Further details are available in Refer to [[STM32MP1 Distribution Package#Generating your own Starter and Developer Packages|Generating your own Starter and Developer Packages]] and [[How to create an SDK for OpenSTLinux distribution]] for further details.

'''Note:''' the legacy command '''bitbake meta-toolchain-qt5''' is not suggestedrecommended because the resulting SDK would miss some target packages.

The image can be flashed on the target board as in [[STM32MP1 Distribution Package#Flashing the built image|Flashing the built image]].

The generated SDK is available in folderthe '''tmp-glibc/deploy/sdk/''' folder. It can be installed as described in [[Install the SDK#Run the SDK installation script|Run the SDK installation script]], withusing the following command:


 {{PC$}} ./tmp-glibc/deploy/sdk/st-example-image-qt-openstlinux-eglfs-stm32mp1-x86_64-toolchain-{{EcosystemRelease/Component | revision=2.0.0 | component=OpenEmbedded | name=short}}-snapshot.sh -y -d <working directory absolute path>/Developer-Package/SDK

==== Select Selecting the display resolution and size in EGLFS ====

When using a display that accepts multiple resolutions, it is possible to specify the preferred resolution the preferred resolution can be specified by editing the board file '''/usr/share/qt5/cursor.json'''.
For example, for an HDMI display, change the line
 { "name": "HDMI1", "mode": "1280x720" },
and enter one of the valid resolutions reported by the command
 {{Board$}} modetest

If the current display resolution is higher than the resolution requested by the QT application, QT will expand expands the application to run it in full screen. This can produce blurred images on the display and can impact the system performance.
It is possible to configure QTThe QT framework can be configured to use only one part of the overall display. For example, to use only an area of 400x300 pixels, add:
 { "name": "HDMI1", "mode": "1280x720"{{HighlightParam|, "size": "400x300"}} },
{{ReviewsComments|-- [[User:Philippe Cornu|Philippe Cornu]] ([[User talk:Philippe Cornu|talk]]) 17:52, 16 November 2020 (CET)<br />You may add a link to [[DRM_KMS_overview]] where you can find information on modetest}}
{{ReviewsComments|-- [[User:Antonio Borneo|Antonio Borneo]] ([[User talk:Antonio Borneo|talk]]) 12:37, 18 November 2020 (CET)<br />I think it's not relevant. I'm not suggesting user to change the display settings, so no link with the tool modetest. Here I'm only suggestion to use part of the already setup screen by adding '''size''' part}}

== QT configuration== Configuring the QT framework ==

By default, QT internal data usesuse 64 bitbits per pixel (16 bitbits for each R, G, B,  and A components).
It is possible to slightly improve the performance by forcing QT to use 32 bit per pixel (8 bitcomponent).
The performance can be slightly improved by forcing the QT framework to use 32 bits per pixel (8 bits for each component).
This can be achieved by editing the file '''layers/meta-st/meta-st-openstlinux/recipes-qt/qt5/qtbase_git.bbappend''' before the build  -and replacing the lineQT_CONFIG_FLAGS += " -no-sse2 -no-opengles3" +withQT_CONFIG_FLAGS += " -no-sse2 -no-opengles3 {{HighlightParam|-no-feature-raster-64bit}}"

'''Note:''' the above setup can produce visible artefacts, so and has to be evaluated on a case by case.

== Build basis.

== Building a QT application ==
Enter in Open the folder that contains the application, enable the QT SDK and compile the application:


 {{PC$}} cd <path_of_app>

 {{PC$}} . <install_path_sdk>/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
 {{PC$}} qmake && make
<noinclude>

[[Category:QT framework]]{{PublicationRequestId | 18172 | 2020-11-19|}}</noinclude>
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The OpenSTLinux distribution offers the possibility to generate examples of images based on the [[QT overview|QT framework]] ([[OpenSTLinux distribution#Images|st-example-image-qt]] and, for {{EcosystemRelease | revision=2.1.0 | range=and after}}, [[OpenSTLinux distribution#Images|st-example-image-qtwayland]]) as demonstrators, not for developing products.
+
The OpenSTLinux distribution enables the generation of example images based on the [[QT overview|QT framework]] ([[OpenSTLinux distribution#Images|st-example-image-qt]] and, for {{EcosystemRelease | revision=2.1.0 | range=and after}}, [[OpenSTLinux distribution#Images|st-example-image-qtwayland]]) for demonstration purposes, not for developing products.
   
This article provides information on how to create the [[SDK for OpenSTLinux distribution|SDK]] for building QT applications based on the example images above.
+
This article provides information on how to create the [[SDK for OpenSTLinux distribution|SDK]] for building QT applications based on the above example images.
   
 
== Prerequisites ==
 
== Prerequisites ==
   
Being able to rebuild an OpenSTLinux image
+
Be able to rebuild an OpenSTLinux image
   
 
== OpenSTLinux QT images and SDK ==
 
== OpenSTLinux QT images and SDK ==
   
OpenSTLinux distribution provides two examples of images based on [[QT overview|QT framework]]:
+
OpenSTLinux distribution provides two examples of images based on the [[QT overview|QT framework]]:
   
* [[OpenSTLinux distribution#Images|st-example-image-qtwayland]] (requires '[[OpenSTLinux distribution#Distros|openstlinux-weston]]' distro and {{EcosystemRelease | revision=2.1.0 | range=and after}}); thanks to weston window management, QT applications are displayed in independent windows and can coexist on the same screen with other non-QT applications;
+
* [[OpenSTLinux distribution#Images|st-example-image-qtwayland]] (requires '[[OpenSTLinux distribution#Distros|openstlinux-weston]]' distro and {{EcosystemRelease | revision=2.1.0 | range=and after}}): thanks to weston window management, QT applications are displayed in independent windows and can coexist on the same screen with other non-QT applications;
   
* [[OpenSTLinux distribution#Images|st-example-image-qt]] (requires '[[OpenSTLinux distribution#Distros|openstlinux-eglfs]]' distro); only one QT application can access the screen and will be displayed in full-screen mode.
+
* [[OpenSTLinux distribution#Images|st-example-image-qt]] (requires '[[OpenSTLinux distribution#Distros|openstlinux-eglfs]]' distro): only one QT application can access the screen. It is displayed in full-screen mode.
{{ReviewsComments|-- [[User:Jean-philippe Romain|Jean-philippe Romain]] ([[User talk:Jean-philippe Romain|talk]]) 17:55, 6 November 2020 (CET)<br />General remark, not sure "future"(will) to be used in wiki page?}}
 
{{ReviewsComments|-- [[User:Antonio Borneo|Antonio Borneo]] ([[User talk:Antonio Borneo|talk]]) 15:03, 12 November 2020 (CET)<br />I prefer to left the rephrasing to the technical writer}}
 
   
To build the images and the associated SDK, the first step requires installing the OpenSTLinux distribution through the steps listed in chapter [[STM32MP1 Distribution Package#Installing the OpenSTLinux distribution|Installing the OpenSTLinux distribution]].
+
To build the images and the associated SDK, first install the OpenSTLinux distribution by following the procedure described in chapter [[STM32MP1 Distribution Package#Installing the OpenSTLinux distribution|Installing the OpenSTLinux distribution]].
   
 
=== QT image and SDK with weston/wayland ===
 
=== QT image and SDK with weston/wayland ===
   
This image and SDK will use QTwayland backend to run QT applications in independent windows managed by weston. It requires {{EcosystemRelease | revision=2.1.0 | range=and after}}.
+
The QT image and SDK use QTwayland back-end to run QT applications in independent windows managed by weston. This requires {{EcosystemRelease | revision=2.1.0 | range=and after}}.
   
Initialize the OpenEmbedded build environment for the [[OpenSTLinux distribution#Distros|openstlinux-weston]] distro
+
Initialize the OpenEmbedded build environment for the [[OpenSTLinux distribution#Distros|openstlinux-weston]] distro:
   
 
  {{PC$}} DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
 
  {{PC$}} DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
   
and read and accept EULA. Further details are available in [[STM32MP1 Distribution Package#Initializing the OpenEmbedded build environment|Initializing the OpenEmbedded build environment]].
+
Read and accept EULA. Refer to [[STM32MP1 Distribution Package#Initializing the OpenEmbedded build environment|Initializing the OpenEmbedded build environment]] for further details.
   
Then build the image and the SDK
+
Then build the image and the SDK:
 
  {{PC$}} bitbake st-example-image-qtwayland
 
  {{PC$}} bitbake st-example-image-qtwayland
 
  {{PC$}} bitbake st-example-image-qtwayland -c populate_sdk
 
  {{PC$}} bitbake st-example-image-qtwayland -c populate_sdk
   
Further details are available in [[STM32MP1 Distribution Package#Generating your own Starter and Developer Packages|Generating your own Starter and Developer Packages]] and [[How to create an SDK for OpenSTLinux distribution]].
+
Refer to [[STM32MP1 Distribution Package#Generating your own Starter and Developer Packages|Generating your own Starter and Developer Packages]] and [[How to create an SDK for OpenSTLinux distribution]] for further details.
   
'''Note:''' the legacy command '''bitbake meta-toolchain-qt5''' is not suggested because the resulting SDK would miss some target packages.
+
'''Note:''' the legacy command '''bitbake meta-toolchain-qt5''' is not recommended because the resulting SDK would miss some target packages.
   
 
The image can be flashed on the target board as in [[STM32MP1 Distribution Package#Flashing the built image|Flashing the built image]].
 
The image can be flashed on the target board as in [[STM32MP1 Distribution Package#Flashing the built image|Flashing the built image]].
   
The generated SDK is in folder '''tmp-glibc/deploy/sdk/'''. It can be installed as described in [[Install the SDK#Run the SDK installation script|Run the SDK installation script]], with the command
+
The generated SDK is available in the '''tmp-glibc/deploy/sdk/''' folder. It can be installed as described in [[Install the SDK#Run the SDK installation script|Run the SDK installation script]], using the following command:
   
 
  {{PC$}} ./tmp-glibc/deploy/sdk/st-example-image-qtwayland-openstlinux-weston-stm32mp1-x86_64-toolchain-{{EcosystemRelease/Component | revision=2.0.0 | component=OpenEmbedded | name=short}}-snapshot.sh -y -d <working directory absolute path>/Developer-Package/SDK
 
  {{PC$}} ./tmp-glibc/deploy/sdk/st-example-image-qtwayland-openstlinux-weston-stm32mp1-x86_64-toolchain-{{EcosystemRelease/Component | revision=2.0.0 | component=OpenEmbedded | name=short}}-snapshot.sh -y -d <working directory absolute path>/Developer-Package/SDK
   
 
=== QT image and SDK with EGLFS ===
 
=== QT image and SDK with EGLFS ===
{{ReviewsComments|-- [[User:Jean-philippe Romain|Jean-philippe Romain]] ([[User talk:Jean-philippe Romain|talk]]) 17:55, 6 November 2020 (CET)<br />To be cross-check with integration team, but discussion ongoing to remove x11/eglfs from OpenSTLinux, see BZ95314}} {{ReviewsComments|-- [[User:Antonio Borneo|Antonio Borneo]] ([[User talk:Antonio Borneo|talk]]) 15:05, 12 November 2020 (CET)<br />No, the image eglfs ("naked", no X11 nor wayland) is not going to be removed. It is the image x11-over-eglfs that is already removed from the page [[OpenSTLinux distribution#Distros|openstlinux-eglfs]]}}
 
This image and SDK will use QT backend to run a single QT applications in fullscreen mode.
 
   
Initialize the OpenEmbedded build environment for the [[OpenSTLinux distribution#Distros|openstlinux-eglfs]] distro
+
The QT image and SDK use QT back-end to run single QT applications in full-screen mode.
  +
 
  +
Initialize the OpenEmbedded build environment for the [[OpenSTLinux distribution#Distros|openstlinux-eglfs]] distro:
   
 
  {{PC$}} DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
 
  {{PC$}} DISTRO=openstlinux-eglfs MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
   
and read and accept EULA. Further details are available in [[STM32MP1 Distribution Package#Initializing the OpenEmbedded build environment|Initializing the OpenEmbedded build environment]].
+
Read and accept EULA. Refer to [[STM32MP1 Distribution Package#Initializing the OpenEmbedded build environment|Initializing the OpenEmbedded build environment]] for further details.
   
Then build the image and the SDK
+
Then build the image and the SDK:
 
  {{PC$}} bitbake st-example-image-qt
 
  {{PC$}} bitbake st-example-image-qt
 
  {{PC$}} bitbake st-example-image-qt -c populate_sdk
 
  {{PC$}} bitbake st-example-image-qt -c populate_sdk
   
Further details are available in [[STM32MP1 Distribution Package#Generating your own Starter and Developer Packages|Generating your own Starter and Developer Packages]] and [[How to create an SDK for OpenSTLinux distribution]].
+
Refer to [[STM32MP1 Distribution Package#Generating your own Starter and Developer Packages|Generating your own Starter and Developer Packages]] and [[How to create an SDK for OpenSTLinux distribution]] for further details.
   
'''Note:''' the legacy command '''bitbake meta-toolchain-qt5''' is not suggested because the resulting SDK would miss some target packages.
+
'''Note:''' the legacy command '''bitbake meta-toolchain-qt5''' is not recommended because the resulting SDK would miss some target packages.
   
 
The image can be flashed on the target board as in [[STM32MP1 Distribution Package#Flashing the built image|Flashing the built image]].
 
The image can be flashed on the target board as in [[STM32MP1 Distribution Package#Flashing the built image|Flashing the built image]].
   
The generated SDK is in folder '''tmp-glibc/deploy/sdk/'''. It can be installed as described in [[Install the SDK#Run the SDK installation script|Run the SDK installation script]], with the command
+
The generated SDK is available in the '''tmp-glibc/deploy/sdk/''' folder. It can be installed as described in [[Install the SDK#Run the SDK installation script|Run the SDK installation script]], using the following command:
   
 
  {{PC$}} ./tmp-glibc/deploy/sdk/st-example-image-qt-openstlinux-eglfs-stm32mp1-x86_64-toolchain-{{EcosystemRelease/Component | revision=2.0.0 | component=OpenEmbedded | name=short}}-snapshot.sh -y -d <working directory absolute path>/Developer-Package/SDK
 
  {{PC$}} ./tmp-glibc/deploy/sdk/st-example-image-qt-openstlinux-eglfs-stm32mp1-x86_64-toolchain-{{EcosystemRelease/Component | revision=2.0.0 | component=OpenEmbedded | name=short}}-snapshot.sh -y -d <working directory absolute path>/Developer-Package/SDK
   
==== Select display resolution and size in EGLFS ====
+
==== Selecting the display resolution and size in EGLFS ====
   
When using a display that accepts multiple resolutions, it is possible to specify the preferred resolution by editing the board file '''/usr/share/qt5/cursor.json'''.
+
When using a display that accepts multiple resolutions, the preferred resolution can be specified by editing the board file '''/usr/share/qt5/cursor.json'''.
 
For example, for an HDMI display, change the line
 
For example, for an HDMI display, change the line
 
  { "name": "HDMI1", "mode": "1280x720" },
 
  { "name": "HDMI1", "mode": "1280x720" },
Line 75: Line 73:
 
  {{Board$}} modetest
 
  {{Board$}} modetest
   
If the current display resolution is higher than the resolution requested by the QT application, QT will expand the application to run it in full screen. This can produce blurred images on the display and can impact the system performance.
+
If the current display resolution is higher than the resolution requested by the QT application, QT expands the application to run it in full screen. This can produce blurred images on the display and can impact the system performance.
   
It is possible to configure QT to use only one part of the overall display. For example, to use only an area of 400x300 pixels, add:
+
The QT framework can be configured to use only one part of the overall display. For example, to use only an area of 400x300 pixels, add:
 
  { "name": "HDMI1", "mode": "1280x720"{{HighlightParam|, "size": "400x300"}} },
 
  { "name": "HDMI1", "mode": "1280x720"{{HighlightParam|, "size": "400x300"}} },
   
{{ReviewsComments|-- [[User:Philippe Cornu|Philippe Cornu]] ([[User talk:Philippe Cornu|talk]]) 17:52, 16 November 2020 (CET)<br />You may add a link to [[DRM_KMS_overview]] where you can find information on modetest}}
+
== Configuring the QT framework ==
{{ReviewsComments|-- [[User:Antonio Borneo|Antonio Borneo]] ([[User talk:Antonio Borneo|talk]]) 12:37, 18 November 2020 (CET)<br />I think it's not relevant. I'm not suggesting user to change the display settings, so no link with the tool modetest. Here I'm only suggestion to use part of the already setup screen by adding '''size''' part}}
 
 
 
== QT configuration ==
 
   
By default, QT internal data uses 64 bit per pixel (16 bit for each R, G, B, A components).
+
By default, QT internal data use 64 bits per pixel (16 bits for each R, G, B and A component).
It is possible to slightly improve the performance by forcing QT to use 32 bit per pixel (8 bit for each component).
+
The performance can be slightly improved by forcing the QT framework to use 32 bits per pixel (8 bits for each component).
This can be achieved by editing the file '''layers/meta-st/meta-st-openstlinux/recipes-qt/qt5/qtbase_git.bbappend''' before the build
+
This can be achieved by editing the file '''layers/meta-st/meta-st-openstlinux/recipes-qt/qt5/qtbase_git.bbappend''' before the build and replacing the line
  -QT_CONFIG_FLAGS += " -no-sse2 -no-opengles3"
+
  QT_CONFIG_FLAGS += " -no-sse2 -no-opengles3"
  +QT_CONFIG_FLAGS += " -no-sse2 -no-opengles3 -no-feature-raster-64bit"
+
with
  +
  QT_CONFIG_FLAGS += " -no-sse2 -no-opengles3 {{HighlightParam|-no-feature-raster-64bit}}"
   
'''Note:''' the above setup can produce visible artefacts, so has to be evaluated case by case.
+
'''Note:''' the above setup can produce visible artefacts and has to be evaluated on a case by case basis.
   
== Build a QT application ==
+
== Building a QT application ==
   
Enter in the folder that contains the application, enable the QT SDK and compile the application
+
Open the folder that contains the application, enable the QT SDK and compile the application:
   
 
  {{PC$}} cd <path_of_app>
 
  {{PC$}} cd <path_of_app>
Line 103: Line 99:
 
<noinclude>
 
<noinclude>
 
[[Category:QT framework]]
 
[[Category:QT framework]]
  +
{{PublicationRequestId | 18172 | 2020-11-19|}}
 
</noinclude>
 
</noinclude>