hi friends,
i am having a window with size (10,800,1010,40) .. its having a button (diagnosButton) ... a thread is running parallel which will receive communication from server and emit a signal newMessage (QString) ... in my mainwindow i get the signal of thread and called a slot ()
this is the slot
Qt Code:
  1. void TidBar::showToolTip(const QString &message)
  2. {
  3. QFont serifFont("Times", 12, QFont::Bold);
  4. QPalette color;
  5. int setval = 0;
  6. color.setColor( QPalette::Inactive,QPalette::QPalette::ToolTipBase,Qt::yellow);
  7. //value = diagnosButton->mapToGlobal(diagnosButton->rect().topLeft());
  8. value = diagnosButton->mapToGlobal(QPoint(0, 0));
  9. qreal x = value.x();
  10. qreal y = value.y();
  11. QRect rectval = this->rect();
  12. QPoint value2 (x + 70, y - 54);
  13.  
  14. QToolTip::setPalette(color);
  15. QToolTip::setFont(serifFont);
  16. QToolTip::showText(value2, message,this ,rectval );
  17.  
  18. }
To copy to clipboard, switch view to plain text mode 
i try to show a tooltip with the message from the thread signal newMessage(QString) .... i thought this tooltip will last for long until i move the cursor outside the window ...
but the tooltip disapper or hide afer few seconds .... i dont know where i mistaked .... please help