PDA

View Full Version : ToolTip not disappear even hideText()



stella1016
29th June 2011, 10:55
I have a progressBar showing some progress by timer. If the progressBar doesn't change for 5sec, I will show the tooltip to give a hint. If the progressbar moves again, the tooltip should be hidden again. So, my tooltip is program-triggered.

The problem is that, when I hide the tooltip, it still shows.
I tried:


QToolTip::showText(this->mapToGlobal(progressBar_overall->pos()), "");
QToolTip::hideText();
QWidget::setToolTip("");


All of these doesn't work for me. But if I do mouse-click of any widget inside the dialog of progressBar, the tooltip will disappear.

Anyone can help? Thanks.

high_flyer
30th June 2011, 15:58
Try calling update() on the dialog after hiding the tool tip.

stella1016
1st July 2011, 16:13
Try calling update() on the dialog after hiding the tool tip.

Thanks, but that didn't solve my problem. Finally I use QLabel to show the info.