[Lazarus] lazcontrols filters

zeljko zeljko at holobit.net
Sun Oct 11 09:26:00 CEST 2015


On 10/11/2015 08:38 AM, Ondrej Pokorny wrote:
> On 10.10.2015 18:47, Juha Manninen wrote:
>> Rekonq uses both QT and KDE libs. Not directly usable for LCL
>> implementation but a nice idea anyway.
>
> It was not exactly an idea to implement it in the LCL but more an
> argument that it is possible to do advanced stuff (custom painting, text
> area moving etc.) even on Linux and not only on Windows.
>
> So that means that it is possible to custom paint an edit at least on
> Qt. It is another problem that we (me definitely) don't know how to do it.

Yes, it's possible to achieve that goal with Qt. In event filter of 
TQtLineEdit add QPaintEvent, and:
1.Paint QLineEdit by Qt - use QObject_event(Widget, Event);
2.Now call SlotPaint() which creates TQtDeviceContext and passes it to 
LCL ... if TEdit have Canvas and OnPaint you can do whatever in that case.
3.Now set Result := True in QPaintEvent, so Qt won't paint it again.

zeljko





More information about the Lazarus mailing list