Commit 92e8555c authored by Hugo Beauzée-Luyssen's avatar 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
parent 0bcbffc8
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
* This class handles resize issues * This class handles resize issues
**********************************************************************/ **********************************************************************/
VideoWidget::VideoWidget( intf_thread_t *_p_i ) VideoWidget::VideoWidget( intf_thread_t *_p_i, QWidget* p_parent )
: QFrame( NULL ) , p_intf( _p_i ) : QFrame( p_parent ) , p_intf( _p_i )
{ {
/* Set the policy to expand in both directions */ /* Set the policy to expand in both directions */
// setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); // setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
......
...@@ -56,7 +56,7 @@ class VideoWidget : public QFrame ...@@ -56,7 +56,7 @@ class VideoWidget : public QFrame
{ {
Q_OBJECT Q_OBJECT
public: public:
VideoWidget( intf_thread_t * ); VideoWidget( intf_thread_t *, QWidget* p_parent );
virtual ~VideoWidget(); virtual ~VideoWidget();
WId request( struct vout_window_t * ); WId request( struct vout_window_t * );
......
...@@ -450,7 +450,7 @@ void MainInterface::createMainWidget( QSettings *creationSettings ) ...@@ -450,7 +450,7 @@ void MainInterface::createMainWidget( QSettings *creationSettings )
/* And video Outputs */ /* And video Outputs */
if( b_videoEmbedded ) if( b_videoEmbedded )
{ {
videoWidget = new VideoWidget( p_intf ); videoWidget = new VideoWidget( p_intf, stackCentralW );
stackCentralW->addWidget( videoWidget ); stackCentralW->addWidget( videoWidget );
} }
mainLayout->insertWidget( 1, stackCentralW ); mainLayout->insertWidget( 1, stackCentralW );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment