Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QToolTip doesn't update when text is changed while tooltp is shown
Forum Updated to NodeBB v4.3 + New Features

QToolTip doesn't update when text is changed while tooltp is shown

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    ThatDude
    wrote on last edited by
    #1

    Qt 5.3.2
    QLineEdit - if I change tooltip with setTooltip(QString&) while tooltip is shown - it doesn't update the text that is shown immediately. I must move away the focus, wait for tooltip to hide then hover back over QLineEdit and only then the new text is shown!?

    1. Is this a known bug?
    2. Is this by design?
    3. How to access actual QToolTip object? QLineEdit has tooltip()/setTooltip() but they work with QString only - QTooltip has methods to force hide/show?
    4. any other ideas...

    How to force the linedit1's toolltip when it is showing to update its text immediately after linedit1.setTooltip("new text");
    I've tried: repaint(), update(), setTooltip("") -> setTooltip("new text") all to no avail.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dvb0222
      wrote on last edited by
      #2

      1 Not a bug
      2 I don't know about by design, but definitely not an intended use model
      3 the ToolTip object used by the Widget is not accessible. From looking at QToolTip docs it is just a set of static methods.

      4 Other ideas
      I have not tried this personally. Try sending a QHelpEvent to the widget after you change the text you want displayed. You might need to rewrite the event handler to remove the old one first.


      David Van Beveren
      Oak Park Technology Corp.
      Malibu, California
      vbdavid@gmail.com

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved