[Interest] dragLeaveEvent never called & nested widget class

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Mon Feb 27 17:20:28 CET 2017


I figured out that recompiling the whole project fixed the issue when the
class is inside the namespace.
Somehow, the moc was not invoked properly, which caused the issue.

2017-02-27 10:17 GMT+01:00 Ch'Gans <chgans at gna.org>:

> On 27 February 2017 at 22:06, Etienne Sandré-Chardonnal
> <etienne.sandre at m4x.org> wrote:
> > Just to clarify, ParameterWidget is a namespace, not a class.
> >
> > So putting a QWidget subclass inside a namespace did break dragLeaveEvent
>
> ... or your namespace breaks QWidget::dragLeaveEvent somehow.
>
> Chris
>
> >
> > 2017-02-27 10:04 GMT+01:00 Etienne Sandré-Chardonnal
> > <etienne.sandre at m4x.org>:
> >>
> >> Dear all,
> >>
> >> I had a problem on a custom widget, where reimplemented dragEnterEvent
> and
> >> dropEvent were properly called, but dragLeaveEvent was never called.
> >>
> >> The event handling function were reimplemented in a "LinkWidget" class,
> >> and then a ParameterWidget::LinkRefWidget was subclassing LinkWidget.
> >>
> >> After many tries for making a MCVE, I figured out that un-nesting
> >> LinkRefWidget was solving the issue.
> >>
> >> Is this a bug, or is nesting QWidget subclasses officially unsupported?
> >>
> >> Thanks!
> >
> >
> >
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170227/a5205497/attachment.html>


More information about the Interest mailing list