PDA

View Full Version : QDockWidget on 4.6.X , weird behaviour



benacler
8th April 2010, 15:44
After updating my "working" app to Qt 4.6.1 (tried 4.6.2 too), I've a weird behaviour where a QDockWidget being resized horizontally by its handle, comes back to the original position after the drag (it's being resized correctly during the drag).
I've a QMainWindow with an empty centralWidget, this worked in 4.5.*

I'm going nut with this since 10 hours without findind the point where the resize is called back again. I've also tried to make an application from scratch, with 2 dock widgets put on the left and the right area. In that case, it works but after resizing them, if you resize the main window, the QDockWidgets go again at 50% / 50% of the available horizontal space.

Anyone has any hint or thinks about something changes in 4.6 that may lead to similar problems ?

To simulate what I say, make a new app , and in the costructor of the main window put the following code, then try to resize:

setCentralWidget(0);
QDockWidget* dock = new QDockWidget(tr("Test"));
addDockWidget(Qt::RightDockWidgetArea,dock);
dock = new QDockWidget(tr("Test2"));
addDockWidget(Qt::LeftDockWidgetArea,dock);
dock = new QDockWidget(tr("Test3"));
addDockWidget(Qt::LeftDockWidgetArea,dock);
dock = new QDockWidget(tr("Test4"));
addDockWidget(Qt::LeftDockWidgetArea,dock);

Thanks!