Skip to content

Commit

Permalink
FIX: parent dialog related displays to avoid gc
Browse files Browse the repository at this point in the history
  • Loading branch information
ZLLentz committed Dec 6, 2024
1 parent 1b3c197 commit b88fd9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pydm/widgets/related_display_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,10 @@ def open_display(self, filename, macro_string="", target=None):
# Not a pydm app: need to give our new display proper pydm styling
# Usually done in PyDMApplication
merge_widget_stylesheet(widget=display)
# Parent the display to avoid garbage collection
display.setParent(self)
display.setWindowFlags(Qt.Window)
display.show()
return display

def context_menu(self):
Expand Down

0 comments on commit b88fd9c

Please sign in to comment.