[vlc-devel] QDockWidget and resizing.

Jean-Baptiste Kempf jb at videolan.org
Tue Dec 18 01:05:26 CET 2007


On Sun, Dec 16, 2007, Benjamin Sergeant wrote :
> Just trying to guess:
> 
> What you could try: overwrite resizeEvent and tell it to don't resize
> horizontally.
> http://doc.trolltech.com/4.3/qwidget.html#resizeEvent
Ok, this is what I wanted to avoid... :D
Should I do it onmy main application ? on my central widget ?

> On Dec 15, 2007 3:46 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> > 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/
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > http://mailman.videolan.org/listinfo/vlc-devel
> >
> 
> --
> To unsubscribe - send a mail to qt-interest-request at trolltech.com with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
Best Regards,

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



More information about the vlc-devel mailing list