[Solved] Tooltip display problem?
-
Suppose i have a window containing one button. I have set a tool tip to that button. When i click that button a new window is opened. In this case once the focus pass to new window when i take the mouse pointer to button again the tool tip is not visible(without clicking). How can i make it visible?
-
Do you mean something like this??
!http://img847.imageshack.us/img847/5848/windowu.png!
Does the new windows have the button too?
If so, I miss it... :P -
Not sure how to do with that. It always annoyed me that (under Linux/X11, at least) the behaviour is inconsistent between toolkits. GTK-based applications will display a tooltip even if the window hasn't focus. Qt-based ones won't.
-
ya luisvaldes88 exactly like that, the new window may or may not have button. do you know the solution
-
hi pratik041, as peppe said, Qt app don't display tooltips where they are not focused.
A solution may be, try to make the button@bool QWidget::setMouseTracking(true)@
and then do something in
@void QWidget::mouseMoveEvent ( QMouseEvent * event )@
I did not try, but in theory, whenever you pass your mouse over the button, it will create a move event that will be handled in
@void QWidget::mouseMoveEvent ( QMouseEvent * event )@
If you try it let us know
best regards.
-
Actually the following is working and i think it is the best solution to do this @window.setAttribute (Qt::WA_AlwaysShowToolTips, true);@
-
Hey thanks.
I'll take a note on this. =,)
how did you find it?
-
In Qt namespace documentation see Qt::WidgetAttribute type