[Qt] #15882: "QT: automatic tool tip window tries to draw beyond screen boundaries and fails."

zeljko zeljko at holobit.net
Mon Mar 8 15:42:07 CET 2010


On Monday 08 March 2010 14:27, Juha Manninen wrote:
> Zeljko,
>
> I found something interesting about issue #15882.
>
> The problem is not about drawing beyond screen boundaries.
> In THintWindow.ActivateHintData, I commented out the offset calculation
> which moves the window up / left so it is fully visible. After that the
> tool tip windows show up nicely, only the bottom / right part is cropped
> off by screen boundary.
> I can't explain why it happens. The offset code looks correct and it works
> correctly with other widgetsets.
>
> If I understand right, the QT's builtin tooltip class (QToolTipH) is not
> used for LCL tooltip but it is created from CustomForm.

No, it uses QToolTip flag in constructor and it is QToolTip.
Look at TQtHintWindow.CreateWidget() (qtwidgets) and 
TQtWSHintWindow.CreateHandle() (qtwsforms).
QToolTipH doesn't have constructor.

> I guess all widgetsets support tooltips. LCL should be changed accordingly.
> That would surely solve this problem in QT as well.

>
> In:
>   procedure TQtWidget.SlotPaint(Sender: QObjectH; Event: QEventH); cdecl;
> I noticed this:
>   if LCLObject is THintWindow then
>     Msg.DC := Msg.DC;
>
> It looks useless but maybe it has some meaning. (for debugging only?)

Don't know, Paul commited that wierd piece of code 
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/lcl/interfaces/qt/qtwidgets.pas?root=lazarus&view=diff&r1=15148&r2=15149 
Seem like useless code.


zeljko




More information about the Qt mailing list