[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Untitled bar
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2021-02-02 10:13:46
Message-ID: b603df1053ebd6fae73aa990f5abfd82 () riverbankcomputing ! com
[Download RAW message or body]

On 02/02/2021 01:58, Nikola Tesla wrote:
> 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()

"does not work for me" isn't the most helpful description. In any event, 
if you are using PyQt6 you will get attribute exceptions from the above.

Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic