Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Transparency of mainwindow using EGLFS
Forum Updated to NodeBB v4.3 + New Features

Transparency of mainwindow using EGLFS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 3 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • VincentBV Offline
    VincentBV Offline
    VincentB
    wrote on last edited by
    #1

    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...

    M 1 Reply Last reply
    0
    • VincentBV VincentB

      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...

      M Offline
      M Offline
      MAnand
      wrote on last edited by
      #2

      @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.

      1 Reply Last reply
      0
      • KillerSmathK Offline
        KillerSmathK Offline
        KillerSmath
        wrote on last edited by
        #3

        These configurations works to me

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

        @Computer Science Student - Brazil
        Web Developer and Researcher
        “Sometimes it’s the people no one imagines anything of who do the things that no one can imagine.” - Alan Turing

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved