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. Make tooltip disappear on QTableView cell
Forum Updated to NodeBB v4.3 + New Features

Make tooltip disappear on QTableView cell

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 705 Views
  • 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.
  • Q Offline
    Q Offline
    Qnut
    wrote on last edited by
    #1

    Hi

    I have a QTableView and a model that returns a tooltip for some cells and nothing for empty cells. When I hovers an empty cell no tooltip is shown. So far so good. My problem is that when I move the mouse from a cell that has a tooltip to an empty cell (with no tooltip) the previous tooltip stays on top for the usual tooltip duration instead of disappearing. So it shows a wrong tooltip for that cell, even when the model returns an empty QString. Is there a way to make the current tooltip hiding?

    Regards

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Setting an empty QString to QToolTip should remove the tooltip for this cell - what Qt version do you use and please provide a minimal, compilable example.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Bonnie
        wrote on last edited by
        #3
        [static] void QToolTip::hideText()
        
        Hides the tool tip. This is the same as calling showText() with an empty string.
        
        Christian EhrlicherC 1 Reply Last reply
        0
        • B Bonnie
          [static] void QToolTip::hideText()
          
          Hides the tool tip. This is the same as calling showText() with an empty string.
          
          Christian EhrlicherC Online
          Christian EhrlicherC Online
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Bonnie Don't see what this should help here... it should be hidden automatically.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          B 1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            @Bonnie Don't see what this should help here... it should be hidden automatically.

            B Offline
            B Offline
            Bonnie
            wrote on last edited by
            #5

            @Christian-Ehrlicher I'm just answering this :)

            Is there a way to make the current tooltip hiding?

            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