def _openPanelSettingsDialog(self): w = self.widget() if not w: return pos = QtGui.QCursor.pos() menu = QtGui.QMenu(w) action = menu.addAction("Multi-Tab Mode") action.setCheckable(True) action.setChecked(int(self.getAttr("multiTabMode"))) action.toggled.connect(self.__multiTabModeChanged) menu.popup(pos + QtCore.QPoint(5,5))
def __init__(self, *args, **kwargs): super(DragDropItem, self).__init__(*args, **kwargs) self.__dragStartPos = QtCore.QPoint(0,0) self.setMinimumHeight(24) self.setMaximumHeight(50) self.setCheckable(True) self.setFocusPolicy(QtCore.Qt.NoFocus) self.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred) wrapperLayout = QtGui.QHBoxLayout(self) wrapperLayout.setSpacing(0) wrapperLayout.setContentsMargins(0,0,0,0) self._widgetLayout = layout = QtGui.QHBoxLayout() layout.setSpacing(self.ITEM_SPACING) layout.setContentsMargins(8,1,8,1) wrapperLayout.addLayout(layout) wrapperLayout.addStretch()