Advertisement
qtinio

zoba michalak

Apr 11th, 2019
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. def mousePressEvent(self, event):
  2. if event.button()==QtCore.Qt.RightButton:
  3. pos = event.pos()
  4. print(pos)
  5. self.update()
  6. super(Ui_Form, self).mousePressEvent(event)
  7. ###################################################################3
  8.  
  9. def mouseMoveEvent(self, event):
  10. # if self.leftState%2:
  11. # self.leftState -= 1
  12. if self.mysz == 2:
  13. position = event.pos()
  14. print(position)
  15. #self.onMouseMoved.emit()
  16.  
  17. def mousePressEvent(self, event):
  18. if event.button()==QtCore.Qt.RightButton:
  19. self.mysz = 2
  20. super(Ui_Form, self).mousePressEvent(event)
  21.  
  22. def mouseReleaseEvent(self, event):
  23. self.mysz = 0
  24. print("hmmmmmmmmm")
  25.  
  26.  
  27. #########################################################
  28. def mouseMoveEvent(self, event):
  29. # if self.leftState%2:
  30. # self.leftState -= 1
  31. if self.mysz == 2:
  32. position = event.pos()
  33. self.bohater.pos_x = int(position.x())
  34. print(self.bohater.pos_x)
  35. self.scene.update()
  36. self.update()
  37.  
  38. #self.onMouseMoved.emit()
  39.  
  40. def mousePressEvent(self, event):
  41. if event.button()==QtCore.Qt.RightButton:
  42. self.mysz = 2
  43. super(Ui_Form, self).mousePressEvent(event)
  44.  
  45. def mouseReleaseEvent(self, event):
  46. self.mysz = 0
  47. print("hmmmmmmmmm")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement