Results 1 to 3 of 3

Thread: ToolTip not disappear even hideText()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Location
    Munich
    Posts
    73
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3

    Question ToolTip not disappear even hideText()

    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:
    Qt Code:
    1. QToolTip::showText(this->mapToGlobal(progressBar_overall->pos()), "");
    2. QToolTip::hideText();
    3. QWidget::setToolTip("");
    To copy to clipboard, switch view to plain text mode 

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: ToolTip not disappear even hideText()

    Try calling update() on the dialog after hiding the tool tip.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jul 2008
    Location
    Munich
    Posts
    73
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3

    Default Re: ToolTip not disappear even hideText()

    Quote Originally Posted by high_flyer View Post
    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.

Similar Threads

  1. Replies: 2
    Last Post: 17th May 2011, 14:47
  2. Can't get title bar to disappear from widget
    By MattPhillips in forum Qt Programming
    Replies: 11
    Last Post: 2nd November 2010, 15:41
  3. Replies: 2
    Last Post: 2nd September 2010, 20:52
  4. QTableWidget: set items disappear after new insertion
    By Raccoon29 in forum Qt Programming
    Replies: 6
    Last Post: 16th March 2008, 19:28
  5. QTableView : headers disappear
    By xavier in forum Qt Programming
    Replies: 2
    Last Post: 8th May 2006, 17:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.