[Qt] viewportEvent of QAbstractScrollArea

Den.Jean at telenet.be Den.Jean at telenet.be
Mon Oct 1 13:05:42 CEST 2007


Hi,

I am working on providing viewportEvent of QAbstractScrollArea:

Here is a first attempt.
http://users.pandora.be/Jan.Van.hijfte/qtforfpc/qt4pas-V1.52_Qt4.3.1.tar.gz
http://users.pandora.be/Jan.Van.hijfte/qtforfpc/win_qt4pas-V1.52_Qt4.3.1.zip

Look at qlclabstractscrollarea.h

 1) use override_viewportEvent to install own viewportEvent
 2) in your own Pascal viewportEvent you can call InheritedViewportEvent
    to call QAbstractScrollArea::viewportEvent(event);
 3) QLCLAbstractScrollArea::viewportEvent does not call QAbstractScrollArea::viewportEvent unless no pascal procedure is stored to call. 
    
Is this what you wanted ? If not, tell me what to change. When everything is coordinated I will release a final V1.52 for all platforms.

Please look at the code of QAbstractScrollArea::viewportEvent
when provide an implementation of viewportEvent.
src/gui/widgets/qabstractscrollarea.cpp

I do not think this was necessary. It could have been done
with an eventfilter. But as you asked for it twice :-). 
The disadvantage of this is that you cannot use it on descendants 
of QAbstractscrollarea. With an eventfilter you can

BTW, congratulations on the progress of the Qt Lazarus. 
Really amazing.

kind regards,

Den Jean


     






More information about the Qt mailing list