Results 1 to 9 of 9

Thread: How to make a transparent QWidget over a Phonon Video?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Qt products
    Qt4
    Platforms
    Windows Android
    Thanks
    14
    Thanked 13 Times in 13 Posts

    Default Re: How to make a transparent QWidget over a Phonon Video?

    try pen.setColor(Qt::transparent);

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: How to make a transparent QWidget over a Phonon Video?

    Why dont you override the video widget itself ? You will need to call the base class paintEvent first and then your lines drawing code.
    That way you can still draw over the video, isnt it

  3. #3
    Join Date
    Mar 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make a transparent QWidget over a Phonon Video?

    Quote Originally Posted by aamer4yu View Post
    Why dont you override the video widget itself ? You will need to call the base class paintEvent first and then your lines drawing code.
    That way you can still draw over the video, isnt it
    I did this first but it didnt work, all i saw was the videostream.

  4. #4
    Join Date
    Mar 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make a transparent QWidget over a Phonon Video?

    Quote Originally Posted by zgulser View Post
    try pen.setColor(Qt::transparent);
    On my painter? I tried it and all it did was to make my painting transparent, not the background.

  5. #5
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Qt products
    Qt4
    Platforms
    Windows Android
    Thanks
    14
    Thanked 13 Times in 13 Posts

    Default Re: How to make a transparent QWidget over a Phonon Video?

    Pardon me,

    what about widget->setStyleSheet("background-color: rgb(0,0,0,0)"); ?

    You can do it from the designer as well.

  6. #6
    Join Date
    Mar 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make a transparent QWidget over a Phonon Video?

    Quote Originally Posted by zgulser View Post
    Pardon me,

    what about widget->setStyleSheet("background-color: rgb(0,0,0,0)"); ?

    You can do it from the designer as well.
    I tried it and it didnt work, thanks anyway.

  7. #7
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 334 Times in 317 Posts

    Default Re: How to make a transparent QWidget over a Phonon Video?

    I did this first but it didnt work, all i saw was the videostream.
    I guess it might be tricky. I guess the phonon will use directX and directX will render directly on memory buffer,,, so am afraid you cant do it directly.. I will try if i get some time...
    till then hope someone else comes to rescue

  8. #8
    Join Date
    Mar 2010
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make a transparent QWidget over a Phonon Video?

    Quote Originally Posted by aamer4yu View Post
    I guess it might be tricky. I guess the phonon will use directX and directX will render directly on memory buffer,,, so am afraid you cant do it directly.. I will try if i get some time...
    till then hope someone else comes to rescue
    Ok, thanks. Appreciate it!

Similar Threads

  1. Playing video using Phonon video widget
    By Leolander in forum Newbie
    Replies: 0
    Last Post: 26th February 2010, 06:15
  2. Phonon Video + Transparent Label Problems
    By jftaylor21 in forum Qt Programming
    Replies: 2
    Last Post: 1st November 2009, 18:53
  3. Replies: 3
    Last Post: 5th July 2009, 17:22
  4. Video freezes during mpeg video playback using Phonon
    By davejames in forum Qt Programming
    Replies: 2
    Last Post: 12th January 2009, 08:45
  5. Non-transparent QWidget on semi-transparent parent
    By EuroElessar in forum Qt Programming
    Replies: 0
    Last Post: 29th August 2008, 16:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.