[Qt] Some changes cause errors in qt ide under win32

zeljko zeljko at holobit.net
Wed Jul 18 09:34:01 CEST 2007


On Wednesday 18 July 2007 09:25, Paul Ishenin wrote:
> zeljko пишет:
> 1. THintWindow.CalcHintRect raises Qt warnings something like "it is
> dangerous to leave active Painters outside paint event" (typed from
> memory). To be more exact DrawText with DT_CALCRECT is guilty for this.

problem is down :)

> 2. I added line
>    Result := Format('Unknown event: %d', [QEvent_type(Event)]);
> to EventTypeToStr debug function. And after that catched unknown events
> 70 and 67 - they are defined only fot QT_3 support. So I think our
> bindings are compiled with Qt3 support. Do we need this? Can we remove it?

No, bindings are not compiled with Qt3 support, but your's qt4 libs could be,
or qt4 libs sends those events, just because nobody cares about it (a bug in 
qt4 ?).

>
> 3. If I comment DrawText in THintWindow then I can catch much more
> events related to THintWindow widget. Without commenting I catch
> exception in next event after PaintEvent.
>
> So, it is something related with using painting routines ouside paint
> event. I dont know how to solve that painting. We have many places in
> LCL where we can write such code:
>
>    DC := GetDC()
>    BitBlt(DC, ...)
>    ReleaseDC(DC)
>
> And now we have restriction that all this is possible only in paint
> events. How to move this code to paintevent????

All widgets have to be painted inside paint event, but eg. pixmaps NOT.
So it depends on defined QPaintDevice->devType().




More information about the Qt mailing list