[vlc-devel] [PATCH] Qt: Add, FullscreenControllerWidget::updateFSCtoolbar() and use it

Brendon Justin brendonjustin at gmail.com
Thu Feb 23 15:34:25 CET 2012


Hi,

On 2/23/2012 6:00 AM, vlc-devel-request at videolan.org wrote:
> diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
> index 091a99b..c1c00b2 100644
> --- a/modules/gui/qt4/main_interface.cpp
> +++ b/modules/gui/qt4/main_interface.cpp
> @@ -344,10 +344,9 @@ void MainInterface::recreateToolbars()
>
>       if( fullscreenControls )
>       {
> -        delete fullscreenControls;
> -        fullscreenControls = new FullscreenControllerWidget( p_intf, this );
> -        CONNECT( fullscreenControls, keyPressed( QKeyEvent * ),
> -                 this, handleKeyPress( QKeyEvent * ) );
> +        /* Update the existing fullscreen controller, since creating a
> +         * new one causes the new one to not appear */
> +        fullscreenControls->updateFSCtoolbar();
>       }
>   }
I believe that you have to re-add a widget to its layout, if you are 
going to destroy and re-create it (as well as removing it from its 
parent before destroying it).  For this reason, I think that the comment 
in this code snippet is wrong.  My understanding of Qt could be wrong 
though.

Thanks,
Brendon Justin



More information about the vlc-devel mailing list