[vlc-devel] QDockWidget and resizing.

Jean-Baptiste Kempf jb at videolan.org
Sun Dec 16 00:46:19 CET 2007


Hello,

I have a QDockWidget and I would like that when I resize my application
( in height ), the QDockWidget increase and not the main Widget.

My (hideous) code does the following:

dockPL = new QDockWidget( qtr( "Playlist" ), this );
dockPL->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );

playlistWidget = new PlaylistWidget( p_intf, settings );
playlistWidget->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
dockPL->setWidget( playlistWidget );

addDockWidget( Qt::BottomDockWidgetArea, dockPL );

QWidget *main = new QWidget;
setCentralWidget( main );

main->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum );


But when I resize, it doesn't increase the dock, but only the main
widget...
What am I doing wrong ?

Full code:
https://trac.videolan.org/vlc/browser/trunk/modules/gui/qt4/main_interface.cpp
and
https://trac.videolan.org/vlc/browser/trunk/modules/gui/qt4/components/interface_widgets.cpp


btw,
http://www.jbkempf.com/~jb/vlc/VLC-1dec.jpg

Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/



More information about the vlc-devel mailing list