Installing QT6 and PySide6 on Jetson Orin Nano

I looked around a lot and it took me a lot of work to get this working, so I’m posting it here for others.

I’m using QT Designer for HMI application design. I couldn’t find a version of QT Designer that uses QT5, and my layout designed in QT Designer 6 didn’t work with the pre-built-in QT5 on the Orin Nano. I had to build from source for QT6 on ARM.

I ended up building twice (many hours each time) since I inadvertently missed a necessary plugin the first time. I was not able to install PyQt6 unfortunately, even after much trial and error. I finally got it working with PySide6. Here are the steps:

To build and install the Qt 6.6.1 from the source located at /home/{user}/Downloads/qt-everywhere-src-6.6.1.tar.xz, including the xcb platform plugin, follow these steps:

  1. Extract the Source Code:
    First, you need to extract the downloaded tarball. Open a terminal and run:

    tar -xvf /home/{user}/Downloads/qt-everywhere-src-6.6.1.tar.xz -C /home/{user}/Downloads/
    

    This will extract the contents into a directory, likely named qt-everywhere-src-6.6.1, in your Downloads folder.

  2. Install Required Dependencies:
    Ensure you have all the required dependencies for building Qt, especially those needed for the xcb plugin:

    sudo apt-get install build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libpng-dev libjpeg-dev libglib2.0-dev libpulse-dev libasound2-dev libcups2-dev libegl1-mesa-dev libxcb1-dev libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev '^libxcb.*-dev'
    
  3. Configure the Build:
    Navigate to the extracted Qt source directory and run the configuration script. Ensure you include the -xcb option to include the xcb plugin:

    cd /home/{user}/Downloads/qt-everywhere-src-6.6.1
    ./configure -platform linux-g++ -xcb -opensource -confirm-license
    

    Adjust the configuration options according to your needs. The -opensource -confirm-license options are for open source development and to confirm acceptance of Qt’s license.

  4. Build and Install:
    Compile and install Qt:

    make
    sudo make install
    

    This will take a significant amount of time depending on your hardware capabilities.

These steps should help you compile and install Qt 6.6.1 from source with the necessary xcb support.

2 Likes

Hi,
Many thanks for your sharing.

For reference, there are some posts about QT5:
How to Install PyQt5 Jetson nano - #2 by prince.alondra
Pyqt not working on Nano - #4 by coolbot
PySide2 (Qt for python) installation on Jetson Xavier - #5 by Muscle_Oliver

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.