0

I am building an app using pyqt5, where I have a central widget and several dockable widgets. The central widget consists of a QTabWidget and a pyforms ControlPlayer widget.

Whenever I resize any of the dockable widget and switch a tab in my QTabWidget, the dockable widgets get resized to their initial sizes. However, if I float around one of the dockable widgets and dock it right back then they don't resize, which is desirable for my application.

Can someone explain to me what is happening here? My guess is that some flag is being set on the central widget when I float the dock window, but I'm not sure which one

Ijlal
  • 159
  • 2
  • 13

1 Answers1

1

I came across the same in the manner: resized QDockWidgets snap back to their original form after the MainWindow is resized or something in my dockwidget is changed (in my case: when tabs change within the dockWidget.)

This is, unfortunately, a bug and is not your fault. I didn't find any fix for PyQt. The C++Community has a fix ready, but I guess I'm just to inexperienced in python to transfer that, since the self.resizeDocks doesn't seem to take my arguments.

see also: https://bugreports.qt.io/browse/QTBUG-65592 or QDockWidget splitter jumps when QMainWindow Resized

MrB
  • 818
  • 8
  • 28
Mordhorst
  • 11
  • 1