Add dock at runtime

34 views
Skip to first unread message

Lav

unread,
Feb 7, 2020, 3:47:57 AM2/7/20
to pyqtgraph

hi 
(repost)
I am trying to use a button in the menu of my window(addwidget) to add another dock to my dock area. ( see file attached)
The widget gets added and it seems to function but i get the following error:   

AttributeError: 'NoneType' object has no attribute 'type'
Traceback (most recent call last):
..pyqtgraph\dockarea\Dock.py", line 170, in resizeEvent
    self.setOrientation()
..\pyqtgraph\dockarea\Dock.py", line 143, in setOrientation
    if self.container().type() == 'tab':
AttributeError: 'NoneType' object has no attribute 'type'

The error does not happen if the main window is empty ( for the 1st widget you add), but the following ones do the same
can anybody help? 

There is a second  button I added(add widget hack), in which I use a workaround, by creating a temporary area to which I add a widget, and then move it back to the original one.
Am I missing something ? Am trying to find the proper way of doing it!
docks_example_rip.py
Reply all
Reply to author
Forward
0 new messages