Hi,
Is it possible to turn off tooltips for certain widgets? Reason is, I have a custom tooltip which is not displaying and just wondered if it is because of the 'built-in' ones?
Regards,
Steve
Hi,
Is it possible to turn off tooltips for certain widgets? Reason is, I have a custom tooltip which is not displaying and just wondered if it is because of the 'built-in' ones?
Regards,
Steve
How did you set the custom tool tip?
Hi Marcel,
I was going to try use a delegate which would then display a custom tooltip. The tooltip I was going to use was from CVXPTooltipManager class ( http://www.tooltips.net) but unfortunately it isn't going to work, it is mainly catered for MFC/ATL apps.
Is it possible to code your own tooltip widget?
Regards,
Steve
Of course, you could create some custom widget which you can show. You could do custom painting in paintEvent();
But make sure to set the Qt::Tooltip flag when you create it.
Regards
Catch QEvent::TooplTip to show custom tooltips. See Tooltips Example.
J-P Nurmi
steg90 (16th May 2007)
Thanks Marcel,
Being quite new to Qt, I'm not sure how to do this yet?. I guess I derive from QWidget, obviously override the paintEvent, mouseMoveEvent and mousePressEvent. Even if I did the custom tooltip, I still unsure how to connect it to my tableview, my thought was to not use the default delegate for the Qt::ToolTipRole and use my own?
Regards,
Steve
Correct! All you need to do is override paintEvent.
Setting Qt::Tooltip will take care of the rest.
Thanks again,
How do I set Qt::Tooltip?
Regards,
Steve
When you create the widget. The first parameter is the parent, the second is the window flags. It is an OR-ed combination of window flags.
See Qt::WindowFlags
steg90 (16th May 2007)
Qt already support html tooltip,tranparent ,that make very customize look and feel.
If it not enough you even can custom draw ,in simple subclass painEvent.
I think no need to use third party tooltip.
steg90 (16th May 2007)
What about using bool QAbstractItemView::viewportEvent ( QEvent * event ) in my TableView? I guess I could write a class which derives from QTableView and override this event?
Regards,
Steve
steg90 (17th May 2007)
Bookmarks