Important: Please read the Qt Code of Conduct -

Cannot make QQuickView/QQuickWidget have transparent background

  • Hey,

    I am working on Qt GUI on embedded system (Nvidia Jetson TX2). Recently, I tried to make my Qt quick application have a transparent background.

    For QQuickView and QQuickWidget, setColor(Qt::transparent) works fine on PC, but it shows a complete transparent window on TX2, which means that all components in GUI are gone, I cannot see them. It shows the same result when I tried to set a semi-transparent background with setColor(QColor(0, 0, 0, 125)).

    ![0_1601667677069_Screenshot from 2020-10-02 12-41-02.png](Uploading 100%)

    However, I found out that it show a transparent window with all components visible (this is what I expect) when using setAttribute(Qt::WA_TranslucentBackground) for QMainWindow on TX2.

    I once thought it is caused by X window system on TX2 since Nvidia documentation says "X window system does NOT support alpha blending", but it can recognize Qt::WA_TranslucentBackground. So, I am really confused now.

    Does anyone have solution or opinion for me?

    Thanks in advance.

Log in to reply