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

Paul Ishenin ip at kmiac.ru
Wed Jul 18 09:25:14 CEST 2007


zeljko пишет:
> On Wednesday 18 July 2007 07:47, Paul Ishenin wrote:
>> Paul Ishenin wrote:
>> To repeat exception you need to:
>> 1. Add TPanel to form (or something else)
>> 2. Set hint to "blabla", Set ShowHint to True
>> 3. Run application and move mouse over panel
>> 4. After showing that "blabla" we get SISIGV
>>
>> Everybody wellcome to thurther investigation.
> 
> wow, THintWindow was first bug fixed by me in qt3CLX port, few years ago ;)

I created separate class for THintWindow - TQtHintWindow (probably 
temporary - for debug purposes)

So, what I digged for now:

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.

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?

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????

Best regards,
Paul Ishenin.





More information about the Qt mailing list