本文整理汇总了Python中pyqtgraph.PlotWidget.setMouseEnabled方法的典型用法代码示例。如果您正苦于以下问题:Python PlotWidget.setMouseEnabled方法的具体用法?Python PlotWidget.setMouseEnabled怎么用?Python PlotWidget.setMouseEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph.PlotWidget
的用法示例。
在下文中一共展示了PlotWidget.setMouseEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_plotWindow
# 需要导入模块: from pyqtgraph import PlotWidget [as 别名]
# 或者: from pyqtgraph.PlotWidget import setMouseEnabled [as 别名]
class Ui_plotWindow(object):
def setupUi(self, plotWindow):
plotWindow.setObjectName(_fromUtf8("plotWindow"))
plotWindow.resize(540, 350)
plotWindow.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.gridLayout = QtGui.QGridLayout(plotWindow)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.graphicsView = PlotWidget(plotWindow)
self.graphicsView.hideButtons()
self.graphicsView.showGrid(True, True)
self.graphicsView.setMenuEnabled(False)
self.graphicsView.setMouseEnabled(False, False)
self.graphicsView.setFrameShadow(QtGui.QFrame.Plain)
self.graphicsView.setFrameShape(QtGui.QFrame.StyledPanel)
self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
self.gridLayout.addWidget(self.graphicsView, 0, 1, 1, 1)
self.treeWidget = QtGui.QTreeWidget(plotWindow)
self.treeWidget.setMaximumSize(QtCore.QSize(200, 16777215))
self.treeWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.treeWidget.setRootIsDecorated(False)
self.treeWidget.setItemsExpandable(False)
self.treeWidget.setExpandsOnDoubleClick(False)
self.treeWidget.setColumnCount(3)
self.treeWidget.setObjectName(_fromUtf8("treeWidget"))
self.treeWidget.header().setVisible(True)
self.treeWidget.header().setDefaultSectionSize(80)
self.gridLayout.addWidget(self.treeWidget, 0, 0, 1, 1)
self.retranslateUi(plotWindow)
QtCore.QMetaObject.connectSlotsByName(plotWindow)
def retranslateUi(self, plotWindow):
plotWindow.setWindowTitle(QtGui.QApplication.translate("plotWindow", "Form", None, QtGui.QApplication.UnicodeUTF8))
self.treeWidget.headerItem().setText(0, QtGui.QApplication.translate("plotWindow", "Legend", None, QtGui.QApplication.UnicodeUTF8))
self.treeWidget.headerItem().setText(1, QtGui.QApplication.translate("plotWindow", "Name", None, QtGui.QApplication.UnicodeUTF8))
self.treeWidget.headerItem().setText(2, QtGui.QApplication.translate("plotWindow", "Value", None, QtGui.QApplication.UnicodeUTF8))