Guest User

Untitled

a guest
Jul 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. class Principal(QMainWindow):
  2. def __init__(self):
  3. QMainWindow.__init__(self)
  4. uic.loadUi("nuev.ui",self)
  5.  
  6. self.menuBar().installEventFilter(self)
  7.  
  8. def eventFilter(self, obj, event):
  9. if obj is self.menuBar() and event.type() == QEvent.MouseMove:
  10. return True
  11. return QMainWindow.eventFilter(self, obj, event)
  12.  
  13.  
  14. if __name__ == '__main__':
  15. import sys
  16.  
  17. app = QApplication(sys.argv)
  18. p = Principal()
  19. p.show()
  20. sys.exit(app.exec_())
Add Comment
Please, Sign In to add comment