Qt 6: Missing QMouseEvent methods

Florian Bruhin me at the-compiler.org
Fri Aug 27 14:14:40 BST 2021


On Fri, Aug 27, 2021 at 01:47:23PM +0100, Phil Thompson wrote:
> 
> On 27/08/2021 13:02, Florian Bruhin wrote:
> > 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.
> 
> It was deprecated in 6.0.0 - documentation bug.

Looks like its deprecation was reversed:
https://codereview.qt-project.org/c/qt/qtbase/+/307752

However, it's still inside a QT_DEPRECATED_SINCE(6, 0) despite the
QT_DEPRECATED_VERSION_X_6_0 being removed. That seems like to be a
mistake. I'll try to find out what's up with that.

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/14209704/attachment.sig>


More information about the PyQt mailing list