Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off opaque resizing of QMainWindow / QDockWidget separator

Tags:

qt

qt4

Is it possible to turn off opaque resizing on QMainWindow / QDockWidget separators?

(i.e. the central widget only resizes once the separator is dropped, and not during the drag.)

like image 432
Robin Avatar asked Sep 18 '09 14:09

Robin


1 Answers

QMainWindow has an animated property that specifies whether animation is used for manipulation of dock widgets and tool bars. By default, this property is enabled so you'll get dynamic (and animated) resizing of the central widget when moving dock widgets around. Clearing it should give you functionality similar to turning off opaque resize in a QSplitter.

QMainWindow* mainWin(new QMainWindow);
mainWin->setAnimated(false);
like image 143
iamtheddrman Avatar answered Oct 16 '22 19:10

iamtheddrman