Qt 6: Missing QMouseEvent methods

Florian Bruhin me at the-compiler.org
Fri Aug 27 13:02:33 BST 2021


On Fri, Aug 27, 2021 at 12:36:05PM +0100, Phil Thompson wrote:
> 
> On 27/08/2021 12:11, Florian Bruhin wrote:
> > Hi,
> > 
> > It looks like QMouseEvent is missing various methods:
> > https://doc.qt.io/qt-6/qmouseevent.html#public-functions
> > 
> > vs.
> > 
> >     >>> from PyQt6.QtGui import QMouseEvent
> >     >>> dir(QMouseEvent)
> >     [
> >         [...]
> >     ]
> > 
> > i.e. all methods of QMouseEvent seem to be missing, only the ones
> > inherited from QSinglePointEvent/QPointerEvent/QInputEvent/QEvent are
> > present.
> 
> ...which are the ones you should use.
> 
> PyQt6 doesn't wrap anything that was marked as deprecated in Qt v6.0.0.

Ah. For some reason they aren't marked as such in the Qt 6.1 docs, but
indeed are in the 6.2 ones:
https://doc-snapshots.qt.io/qt6-dev/qmouseevent.html#public-functions

> pos() was missing though.

flags() too.

Florian

-- 
            me at the-compiler.org | https://www.qutebrowser.org 
       https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
       GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
             I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210827/73172b74/attachment.sig>


More information about the PyQt mailing list