當前位置: 首頁>>代碼示例>>Python>>正文


Python GraphicsLayoutWidget.setAcceptDrops方法代碼示例

本文整理匯總了Python中pyqtgraph.GraphicsLayoutWidget.setAcceptDrops方法的典型用法代碼示例。如果您正苦於以下問題:Python GraphicsLayoutWidget.setAcceptDrops方法的具體用法?Python GraphicsLayoutWidget.setAcceptDrops怎麽用?Python GraphicsLayoutWidget.setAcceptDrops使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pyqtgraph.GraphicsLayoutWidget的用法示例。


在下文中一共展示了GraphicsLayoutWidget.setAcceptDrops方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: Ui_MainWindow

# 需要導入模塊: from pyqtgraph import GraphicsLayoutWidget [as 別名]
# 或者: from pyqtgraph.GraphicsLayoutWidget import setAcceptDrops [as 別名]

#.........這裏部分代碼省略.........
        self.PlayButton_2.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.PlayButton_2.sizePolicy().hasHeightForWidth())
        self.PlayButton_2.setSizePolicy(sizePolicy)
        self.PlayButton_2.setMinimumSize(QtCore.QSize(100, 32))
        self.PlayButton_2.setMaximumSize(QtCore.QSize(100, 32))
        self.PlayButton_2.setObjectName(_fromUtf8("PlayButton_2"))
        self.horizontalLayout_2.addWidget(self.PlayButton_2)
        self.FindBraggsButton = QtGui.QPushButton(self.widget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.FindBraggsButton.sizePolicy().hasHeightForWidth())
        self.FindBraggsButton.setSizePolicy(sizePolicy)
        self.FindBraggsButton.setMinimumSize(QtCore.QSize(100, 32))
        self.FindBraggsButton.setMaximumSize(QtCore.QSize(100, 32))
        self.FindBraggsButton.setObjectName(_fromUtf8("FindBraggsButton"))
        self.horizontalLayout_2.addWidget(self.FindBraggsButton)
        self.FindBraggsButton.raise_()
        self.PlayButton_2.raise_()
        self.verticalLayout_5.addWidget(self.widget)
        self.gridLayout_12.addWidget(self.groupBox_3, 2, 0, 1, 1)
        self.horizontalLayout_8.addWidget(self.widget_2)
        self.graphicsView = GraphicsLayoutWidget(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth())
        self.graphicsView.setSizePolicy(sizePolicy)
        self.graphicsView.setMinimumSize(QtCore.QSize(800, 800))
        self.graphicsView.setSizeIncrement(QtCore.QSize(1, 1))
        self.graphicsView.setAcceptDrops(False)
        self.graphicsView.setObjectName(_fromUtf8("graphicsView"))
        self.horizontalLayout_8.addWidget(self.graphicsView)
        self.verticalLayout_8 = QtGui.QVBoxLayout()
        self.verticalLayout_8.setObjectName(_fromUtf8("verticalLayout_8"))
        self.groupBox_4 = QtGui.QGroupBox(self.centralwidget)
        self.groupBox_4.setObjectName(_fromUtf8("groupBox_4"))
        self.horizontalLayout_6 = QtGui.QHBoxLayout(self.groupBox_4)
        self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
        self.gridLayout_4 = QtGui.QGridLayout()
        self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
        self.Boost = QtGui.QLineEdit(self.groupBox_4)
        self.Boost.setObjectName(_fromUtf8("Boost"))
        self.gridLayout_4.addWidget(self.Boost, 0, 1, 1, 1)
        self.ColorMap = QtGui.QComboBox(self.groupBox_4)
        self.ColorMap.setObjectName(_fromUtf8("ColorMap"))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.ColorMap.addItem(_fromUtf8(""))
        self.gridLayout_4.addWidget(self.ColorMap, 3, 1, 1, 1)
        self.Min = QtGui.QLineEdit(self.groupBox_4)
        self.Min.setObjectName(_fromUtf8("Min"))
        self.gridLayout_4.addWidget(self.Min, 1, 1, 1, 1)
        self.label_9 = QtGui.QLabel(self.groupBox_4)
        self.label_9.setAlignment(QtCore.Qt.AlignCenter)
開發者ID:tschoonj,項目名稱:NanoPeakCell,代碼行數:70,代碼來源:npg_qt4_ui.py


注:本文中的pyqtgraph.GraphicsLayoutWidget.setAcceptDrops方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。