Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qwidget transparency is not coming for my application



  • System: Embedded linux
    Kernel Version: Linux 4.4.
    Qt: 5.0
    My application needs to create a single qwidget with background color:blue, with a 15% transparency.
    I used Qt interface setWindowOpacity(0.85); it works good with windows platform but it draws a complete opaque widget in my linux machine. (both in Qt4.8 and Qt5.0)
    I also tried with below options.

    • setStyleSheet("background-color: rgba( 23, 29, 35, 85%)"); it is working while using Qt4.8, but not working for Qt5.0
    • setAttribute(Qt::WA_TranslucentBackground); it gives complete transparency in my linux machine, not working for windows.
    • Also tried to overload paintEvent and setting the alpha.
      I could not understand why transparency of widget is not working for Qt5.0, although i tried to mention RGBA explicitly for my widget.
      Can anybody help me resolving this issue.


  • @BikashSahu
    Is this a gfx card driver/limitation under Linux/embedded?

    https://www.qtcentre.org/threads/18072-How-to-set-Qt-window-transparent

    Forget about transculency on embedded linux. Your X server there probably doesn't support compositing anyway.

    so it is not possible to get translucency on embedded linux anyway?



  • Thanks JonB for your reply, I am checking my x-server side for this issue.



  • @JonB : The issue was caused by our wayland compositor (window manager) of embedded system.


Log in to reply