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. How show transparent widget over overlay widget?

How show transparent widget over overlay widget?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 8.4k 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.
  • R Offline
    R Offline
    RazrFalcon
    wrote on last edited by
    #1

    I want to show transparent widget over overlay widget which I give to mplayer.

    I use QMplayer wrapper for it: http://qt-apps.org/content/show.php?content=145100

    So my code looks like:
    @QMPlayer *m_mplayer = new QMPlayer(this);
    m_mplayer->setWinID((qint32)videoWidget->winId());@

    Then I show QLabel over videoWidget(QWidget) with transparent image (SVG). But QLabel use backgroud from mainwindow and not from video.
    I tries to use widget attributes for it, like WA_TranslucentBackground or WA_ContentsPropagated, but without any result.

    How can I force it to use video widget as parent background?

    My english not realy good, so it's hard to explain. Here is example of what I get:
    http://itmages.ru/image/view/1122569/3fe5901c

    Linux, KDE

    UPD: the same problem using phonon... So I have nontransparent QLabel over Phonon::VideoPlayer widget.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      Hello, ~RazrFalcon

      Why, you guys, don't want to search over devnet? There are some forum posts about that. So, solution should be smth like that:
      @
      QLabel *label = new QLabel;
      label->setStyleSheet("background:transparent");
      label->setAttribute(Qt::WA_TranslucentBackground);
      @

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RazrFalcon
        wrote on last edited by
        #3

        I already tries it.
        It did not help.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tucnak
          wrote on last edited by
          #4

          [quote author="RazrFalcon" date="1374160100"]I already tries it.
          It did not help.[/quote]

          Try to set those properties for parent widget and check SVG transparency.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            RazrFalcon
            wrote on last edited by
            #5

            SVG is really transparent.
            Setting those options to parent makes no changes.

            Creating an example is useless, because I have only Phonon::VideoPlayer(VLC as backend) and QLabel with transparent SVG on top of it with parent to QMainWindow.

            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