[vlc-commits] qt: Explicitely parent the VideoWidget to the central stack
Hugo Beauzée-Luyssen
git at videolan.org
Thu Jan 26 12:43:31 CET 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Jan 26 12:38:49 2017 +0100| [92e8555cae7ccb1759f7d5b35089ca638e849866] | committer: Hugo Beauzée-Luyssen
qt: Explicitely parent the VideoWidget to the central stack
This ensure the VideoWidget will have a valid initial size
Fix #17895
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=92e8555cae7ccb1759f7d5b35089ca638e849866
---
modules/gui/qt/components/interface_widgets.cpp | 4 ++--
modules/gui/qt/components/interface_widgets.hpp | 2 +-
modules/gui/qt/main_interface.cpp | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
index e75e264..b6026aa 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -66,8 +66,8 @@
* This class handles resize issues
**********************************************************************/
-VideoWidget::VideoWidget( intf_thread_t *_p_i )
- : QFrame( NULL ) , p_intf( _p_i )
+VideoWidget::VideoWidget( intf_thread_t *_p_i, QWidget* p_parent )
+ : QFrame( p_parent ) , p_intf( _p_i )
{
/* Set the policy to expand in both directions */
// setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
diff --git a/modules/gui/qt/components/interface_widgets.hpp b/modules/gui/qt/components/interface_widgets.hpp
index 5eeeda3..b2cbf80 100644
--- a/modules/gui/qt/components/interface_widgets.hpp
+++ b/modules/gui/qt/components/interface_widgets.hpp
@@ -56,7 +56,7 @@ class VideoWidget : public QFrame
{
Q_OBJECT
public:
- VideoWidget( intf_thread_t * );
+ VideoWidget( intf_thread_t *, QWidget* p_parent );
virtual ~VideoWidget();
WId request( struct vout_window_t * );
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 59a3345..4c1c459 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -450,7 +450,7 @@ void MainInterface::createMainWidget( QSettings *creationSettings )
/* And video Outputs */
if( b_videoEmbedded )
{
- videoWidget = new VideoWidget( p_intf );
+ videoWidget = new VideoWidget( p_intf, stackCentralW );
stackCentralW->addWidget( videoWidget );
}
mainLayout->insertWidget( 1, stackCentralW );
More information about the vlc-commits
mailing list