Results 1 to 3 of 3

Thread: Overlaying Widgets on top of VideoWidget

  1. #1
    Join Date
    Jun 2010
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Overlaying Widgets on top of VideoWidget

    Hello,

    My application is a Set-Top-Box demo. I'm using Phonon VideoPlayer to simply put a looping video on the screen. Easy to add a key event handler to support play/pause/mute/exit from the keyboard. Mouse swipes enable channel changing, and mouse drag up/down enable volume changing. (Demo is for a position-aware wireless remote whose dongle enumerates as a mouse and keyboard - think "Wii remote")

    I'd like to display widgets on the screen in front of the video (example - volume indicator or mute indicator). In the simplest case, if I create a QSlider and parent it to the player's videoWidget(), it can be shown and hidden as expected, however its background is black. That is, the video does not show through the normally transparent background of the widget.

    So I thought about writing my own slider, and using the render() method to paint my slider's background to match the underlying video. However, there is no newVideoFrame() or similar signal I can connect to which would let me trigger this on the end of a new video frame. The tick() signal does not seem to be synced to the frame (feature request).

    I'd also like to put heads-up text and other things on the screen while the video plays in the background. None of these things are rectangular.

    Is my design just something that Phonon:VideoWidget or MediaObject will not support? If not, tell me how to let the video shine through! If so, suggest some other solution. Thanks!

    dvb

  2. #2
    Join Date
    Mar 2010
    Posts
    9
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Overlaying Widgets on top of VideoWidget

    see at QStackedLayout and QStackedLayout::StackingMode enum. (use QStackedWidget for ease)
    put there two widgets: video widget and transparent widget with your controls and set layout's stacking mode to StackAll.

    see http://doc.qt.nokia.com/4.7/qstacked...ckingMode-prop for more detailes

  3. #3
    Join Date
    May 2011
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Overlaying Widgets on top of VideoWidget

    opsimath, did papius' suggestion work?

Similar Threads

  1. QPixmap::grabWidget on a scaled Phonon::VideoWidget?
    By linus in forum Qt Programming
    Replies: 0
    Last Post: 6th April 2010, 13:19
  2. Zoom in a Phonon::VideoWidget
    By linus in forum Qt Programming
    Replies: 1
    Last Post: 26th March 2010, 21:13
  3. Replies: 1
    Last Post: 16th December 2009, 07:01
  4. Replies: 0
    Last Post: 25th May 2009, 10:00
  5. Phonon::VideoWidget Problem with AspectRatio
    By tituslup in forum Qt Programming
    Replies: 1
    Last Post: 27th July 2008, 17:04

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.