How show transparent widget over overlay widget?



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



  • 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);
    @



  • I already tries it.
    It did not help.



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



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


Log in to reply
 

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