Example #1
0
    def focusInEvent(self, QFocusEvent):
        QtGui.QComboBox.focusInEvent(self,
                                     QtGui.QFocusEvent(QtCore.QEvent.FocusIn))

        effect = QtGui.QGraphicsDropShadowEffect(self)
        effect.setOffset(0, 0)
        effect.setBlurRadius(15)
        effect.setColor(QtGui.QColor("#1053DA"))
        self.setGraphicsEffect(effect)
Example #2
0
    def mousePressEvent(self, event):
        p = QtCore.QPointF(event.pos())

        if (self.__in_rbtn_area(p)):
            self.btn_right_press = True
            self.btn_left_press = False
            self.__mousep = p
        if (self.__in_lbtn_area(p)):
            self.btn_right_press = False
            self.btn_left_press = True
            self.__mousep = p
        self.update()
        event = QtGui.QFocusEvent(QtCore.QEvent.FocusIn,
                                  QtCore.Qt.MouseFocusReason)
        self.emit(QtCore.SIGNAL('focusIn(QFocusEvent)'), event)
Example #3
0
    def focusInEvent(self, QFocusEvent):
        QtGui.QLineEdit.focusInEvent(self,
                                     QtGui.QFocusEvent(QtCore.QEvent.FocusIn))

        if self.field != None:
            self.parent().parent().setBottomFieldVisibility(self.field)
            effect = QtGui.QGraphicsDropShadowEffect(self)
            effect.setOffset(0, 0)
            effect.setBlurRadius(10)
            effect.setColor(QtGui.QColor("#6533AC"))
            self.setGraphicsEffect(effect)
        else:
            effect = QtGui.QGraphicsDropShadowEffect(self)
            effect.setOffset(0, 0)
            effect.setBlurRadius(10)
            effect.setColor(QtGui.QColor("#1053DA"))
            self.setGraphicsEffect(effect)
Example #4
0
 def focusOutEvent(self, QFocusEvent):
     QtGui.QComboBox.focusOutEvent(
         self, QtGui.QFocusEvent(QtCore.QEvent.FocusOut))
     self.setGraphicsEffect(None)
Example #5
0
 def focusOutEvent(self, QFocusEvent):
     QtGui.QLineEdit.focusOutEvent(
         self, QtGui.QFocusEvent(QtCore.QEvent.FocusOut))
     self.setGraphicsEffect(None)