def setGraphView(self, graphView):
self.graphView = graphView
# Setup Layout
layout = QtWidgets.QVBoxLayout(self)
layout.addWidget(self.graphView)
self.setLayout(layout)
# Setup hotkeys for the following actions.
deleteShortcut = QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Delete), self)
deleteShortcut.activated.connect(self.graphView.deleteSelectedNodes)
frameShortcut = QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_F), self)
frameShortcut.activated.connect(self.graphView.frameSelectedNodes)
frameShortcut = QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_A), self)
frameShortcut.activated.connect(self.graphView.frameAllNodes)
评论列表
文章目录