33-Linux QT Environment
Last updated
Last updated
The Ubuntu 20.04 system is configured with the QT running environment by default, and the following commands can be executed to test
The Debian11 system is configured with the QT running environment by default, and the following commands can be executed to test
Open the dual QT window interface
Qmake tool
View the current Linux system architecture
The board subsystem is an ARM architecture, and the virtual machine is a X86_64 architecture
Install dependencies
Qt is not in the maintenance version
Select the version you require
Virtual machine selection:
After downloading, run the installer in the virtual machine
ARM architecture selection:
Select single
Select tar.xz
Unzip it after downloading in the opt folder
After the decompression is complete, enter the folder and create auto.sh script file.
The script is for executing./configure -Prefix /opt/Qt/\ Qt installation path -OpenSource-confirm-license\ Installed version, community version or commercial version -Nomake examples\ do not compile installation examples -Nomake tests\ do not compile installation tests -Release\ release compilation -Skip qt3d\ Skip compilation module -Skip qtcharts\ skip compilation module -Skip qtandroidextras\ Skip compilation module -Skip qtlocation\ Skip the compilation module, which is error-prone -Skip qtmultimedia\ Skip compilation module -Skip qtsensors\ Skip compilation module -Skip qtserialbus\ Skip compilation module -Skip qtserialport\ Skip compilation module -Skip qtwayland\ Skip compilation module -Skip qtwebengine\ Skip the compilation module, which is prone to errors
qtlocation qtwebengine, if these two modules are not particularly needed, it is recommended to give up the compilation These commands are described in the decompressed README After execution, improve according to the prompts. Most of the prompt errors depend on incomplete installation. execute
Long time, 4-12 hours based on board function
FAQ: If you have already installed python3, but the Python interpreter is missing during the build process. You can create a symbolic link:
Execute after completion
This command installs the program in/opt/Qt/. Modify environment variables after successful installation:
Finally execute 'qmake -v'
The virtual machine installer will generally install qtcreator synchronously, no need to install it again
To install qtcreator, you must first install Qt and compile qtcreator with Qt. If there is an error in compiling Qt, the compilation at this location will also error. If Qt compiles with uncompiled modules or contains non-dependent modules, the qt compilation will not be affected, but the qtcreator will be affected. I tried adding -no-opengl, and there is no error in compiling qt. You can install it, but the qtcreator compiles with an error.
Qtcreator should preferably correspond to the Qt version QtCreator source code
Unzip after download is complete Here, the above tutorial is defaulted to after completion: Enter the decompression path and execute
Wait for the MakeFile file to be generated after completion. Then execute
After the compilation is completed, execute
executed
Open the bin folder and there will be qtcreator and qtcreator.sh Execute './qtcreator.sh &' This way qtcreator will run in the background. Finally, you can configure qtcreator. Tools - > Options - > Kits
Kits can select gcc as the compiler toolchain corresponding to the board. Generally, qtcreator is set by default.
Virtual machine: It is best to use the cross-compilation tool in the SDK (or go to the official website to download and install the same cross-toolchain yourself)
Board side: Just install gcc, no need to cross-compile