Skip to content

Commit

Permalink
Merge pull request #4352 from ales-erjavec/fixes/qgraphicsscene-parent
Browse files Browse the repository at this point in the history
[FIX] Give created QGraphicsScenes a parent
  • Loading branch information
janezd authored Apr 9, 2020
2 parents 321f9ed + 0eb66bc commit 0105f41
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Orange/widgets/unsupervised/owhierarchicalclustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def on_annotation_changed(value):

gui.auto_send(box, self, "autocommit", box=False)

self.scene = QGraphicsScene()
self.scene = QGraphicsScene(self)
self.view = StickyGraphicsView(
self.scene,
horizontalScrollBarPolicy=Qt.ScrollBarAlwaysOff,
Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/visualize/owboxplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def __init__(self):
stateWhenDisabled=False)

gui.vBox(self.mainArea, addSpace=True)
self.box_scene = QGraphicsScene()
self.box_scene = QGraphicsScene(self)
self.box_scene.selectionChanged.connect(self.commit)
self.box_view = QGraphicsView(self.box_scene)
self.box_view.setRenderHints(QPainter.Antialiasing |
Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/visualize/owmosaic.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def __init__(self):

self.areas = []

self.canvas = QGraphicsScene()
self.canvas = QGraphicsScene(self)
self.canvas_view = ViewWithPress(
self.canvas, handler=self.clear_selection)
self.mainArea.layout().addWidget(self.canvas_view)
Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/visualize/owsieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def __init__(self):
self.attr_box, self, "Score Combinations", self.set_attr)
self.vizrank_button.setSizePolicy(*fixed_size)

self.canvas = QGraphicsScene()
self.canvas = QGraphicsScene(self)
self.canvasView = ViewWithPress(
self.canvas, self.mainArea, handler=self.reset_selection)
self.mainArea.layout().addWidget(self.canvasView)
Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/visualize/owsilhouetteplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def __init__(self):
# Ensure that the controlArea is not narrower than buttonsArea
self.controlArea.layout().addWidget(self.buttonsArea)

self.scene = QGraphicsScene()
self.scene = QGraphicsScene(self)
self.view = StickyGraphicsView(self.scene)
self.view.setRenderHint(QPainter.Antialiasing, True)
self.view.setAlignment(Qt.AlignTop | Qt.AlignLeft)
Expand Down
2 changes: 1 addition & 1 deletion Orange/widgets/visualize/owvenndiagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __init__(self):
self.area_keys = []

# Main area view
self.scene = QGraphicsScene()
self.scene = QGraphicsScene(self)
self.view = QGraphicsView(self.scene)
self.view.setRenderHint(QPainter.Antialiasing)
self.view.setBackgroundRole(QPalette.Window)
Expand Down

0 comments on commit 0105f41

Please sign in to comment.