Results 1 to 3 of 3

Thread: youtube fullscreen effect for a widget

  1. #1
    Join Date
    Dec 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default youtube fullscreen effect for a widget

    Hi,
    I'm trying to make a widget be fullscreen that is initially part of a form, much like a youtube of vimeo widget is small at first, then you click a button to make it become fullscreen. My attempts to do this are listed below:

    When I create the Phonon::VideoPlayer instance, the widget is part of a form (added to a Layout). The VideoPlayer widget appears in the correct position, and also plays the media correctly. However, I have a pushbutton to help me toggle the widget into fullscreen mode. This callback has code which set's the VideoPlayer's parent to NULL and removes it from the form's Layout. After the VideoPlayer widget has been liberated, i call it's ::showFullScreen member function. Should this be enough to see the widget as fullscreen?

    Thanks!

  2. #2
    Join Date
    Dec 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: youtube fullscreen effect for a widget

    I was able to get the Phonon::VideoPlayer widget to correctly showFullscreen() by removing the parent, but to make the widget return to the parent when the user hits the Escape key has been hard. It seems like there should be a signal I can catch when fullscreen is toggled. If I could connect to it, I could use the default key event implementation (for PopUps) that correctly makes the widget showNormal() when a user hits the Escape key, so that I could re-parent the widget in the form. I didn't find this signal, which means I have to handle the key event myself, which brought up other problems. This whole things seems like it should be really simple and a FAQ. Has anyone tried to do it yet?

  3. #3
    Join Date
    Jan 2008
    Location
    Bengaluru
    Posts
    144
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: youtube fullscreen effect for a widget

    Hey!

    When you a press a pushbutton for fullscreen, do not set the parent NULL to a widget which is inside already, instead create a one more widget make the parent NULL and make it to showfullscreen. When user clicks escape delete the newly created widget.

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. Replies: 2
    Last Post: 11th November 2009, 08:03
  3. making widget back from fullscreen
    By anoar in forum Qt Programming
    Replies: 2
    Last Post: 22nd September 2009, 17:13
  4. How to Open & Close a Widget ?!!
    By Fatla in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 20:39
  5. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35

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.