[Qt] strange viewportEvent events
Den Jean
Den.Jean at telenet.be
Fri Oct 5 18:50:12 CEST 2007
On Friday 05 October 2007 16:40:11 Павел Ишенин wrote:
> Den, can you explain strange event numbers in viewportEvent? Maybe some
> error in bindings or in my DNA :)
I suspect the DNA ofcourse :-)
Can your remove the & before event in the eventhandler:
qlclabstractscrollarea.h:
==============
change
(*(func_type)viewportEventOverride.func)(viewportEventOverride.data, (const QEventH) &event,(bool *) &result);
***
into
(*(func_type)viewportEventOverride.func)(viewportEventOverride.data, (const QEventH) event,(bool *) &result);
and recompile library.
Report if this fixes it and then I will release new version.
I do not have sample code ready to test it easily.
You should get these events:
src/gui/widgets/qabstractscrollarea.cpp:
========================
bool QAbstractScrollArea::viewportEvent(QEvent *e)
{
switch (e->type()) {
case QEvent::Resize:
case QEvent::Paint:
case QEvent::MouseButtonPress:
case QEvent::MouseButtonRelease:
case QEvent::MouseButtonDblClick:
case QEvent::MouseMove:
case QEvent::ContextMenu:
#ifndef QT_NO_WHEELEVENT
case QEvent::Wheel:
#endif
#ifndef QT_NO_DRAGANDDROP
case QEvent::Drop:
case QEvent::DragEnter:
case QEvent::DragMove:
case QEvent::DragLeave:
#endif
return QFrame::event(e);
case QEvent::LayoutRequest:
return event(e);
default:
break;
}
return false; // let the viewport widget handle the event
}
regards,
Den Jean
More information about the Qt
mailing list