Transparency of mainwindow using EGLFS



  • Hi,

    I'm currentlty trying to developp an application that uses two framebuffer of my imx6 based board. The first one is used to display a gstreamer video while the second will be use to add some action buttons (stop, play for example).

    I'm facing a problem that is :
    When I launch the gstreamer on /dev/fb0 (background) and then launch the qt application on /dev/fb1 (foreground) I would like to set a region of the Qt application (bases on a MainWindow designed with QtDesigner) transparency. But I'm not able to set it work. I try with :

    w.setAttribute(Qt::WA_TranslucentBackground);
    w.setStyleSheet("background:transparent;");
    QRegion maskedRegion(0, 0, 1280, 800);
    w.setMask(maskedRegion);
    

    But still not work, there is always a default transparency ...
    I suspect that the framebuffers have already their own alpha layer but I don't know how to progress...



  • @VincentB

    Hi,

    I am also facing the same issue and came across to your post.
    I thought to check with you whether you got some solution for this.

    In my current application also I am also using two Framebuffer, fb0 for drawing waveform via directly updating the pixel (this is not a Qt Application) and fb1 for Qt Application.

    Expected behavior : When any Qt Window or dialog is active then overlapped area show not show the fb0 content it should be only Qt application.

    Actual behavior : even if my Qt dialog is active the overlapped area also shows the drawing content.

    Any kind of pointer/info will be really a great help.
    Also if you know how to solve this with using single buffer only.



  • These configurations works to me

    setWindowFlags(Qt::FramelessWindowHint);
    setAttribute(Qt::WA_TranslucentBackground);
    setStyleSheet("background:transparent;");
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.