Untitled bar
Nikola Tesla
origenyesencia at gmail.com
Tue Feb 2 01:58:55 GMT 2021
Hello, I created a form without a title bar and trying to redefine this
method to be able to move my form with the left mouse does not work for
me (I am using PyQt 6)
defmouseMoveEvent(self, event):
if event.buttons() == Qt.LeftButton:
self.move(self.pos() + event.globalPos() - self.dragPos)
self.dragPos = event.globalPos()
event.accept()
defmousePressEvent(self, event):
if event.buttons() == Qt.LeftButton:
self.dragPos = event.globalPos()
event.accept()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210201/3fc39713/attachment.htm>
More information about the PyQt
mailing list