Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qwidget transparency is not coming for my application
Forum Updated to NodeBB v4.3 + New Features

Qwidget transparency is not coming for my application

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 854 Views
  • 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.
  • B Offline
    B Offline
    BikashSahu
    wrote on last edited by
    #1

    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.
    JonBJ 1 Reply Last reply
    0
    • B BikashSahu

      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.
      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

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

      B 1 Reply Last reply
      0
      • B Offline
        B Offline
        BikashSahu
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • JonBJ JonB

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

          B Offline
          B Offline
          BikashSahu
          wrote on last edited by
          #4

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

          1 Reply Last reply
          1

          • Login

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