ui update

This commit is contained in:
ingvar1995 2016-05-19 00:38:21 +03:00
parent 3a835ceb7e
commit b2210c21cf
9 changed files with 104 additions and 63 deletions

View file

@ -21,3 +21,14 @@ class CenteredWidget(QtGui.QWidget):
cp = QtGui.QDesktopWidget().availableGeometry().center()
qr.moveCenter(cp)
self.move(qr.topLeft())
class QRightClickButton(QtGui.QPushButton):
def __init__(self, parent):
super(QRightClickButton, self).__init__(parent)
def mousePressEvent(self, event):
if event.button() == QtCore.Qt.RightButton:
self.emit(QtCore.SIGNAL("rightClicked()"))
else:
super(QRightClickButton, self).mousePressEvent(event)