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. Is there any method to show tip when mouse hovering over label

Is there any method to show tip when mouse hovering over label

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 986 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.
  • C Offline
    C Offline
    chris_rookie
    wrote on last edited by
    #1

    What I want is like this picture.
    b05a6662-ad1c-42e1-be89-68947b1a1ab5-image.png

    JonBJ 1 Reply Last reply
    0
    • C chris_rookie

      What I want is like this picture.
      b05a6662-ad1c-42e1-be89-68947b1a1ab5-image.png

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @chris_rookie
      All QWidgets, therefore including QLabel, inherit https://doc.qt.io/qt-5/qwidget.html#toolTip-prop. It will not have the "bubble" in your picture, but have you started from there?

      C 1 Reply Last reply
      4
      • JonBJ JonB

        @chris_rookie
        All QWidgets, therefore including QLabel, inherit https://doc.qt.io/qt-5/qwidget.html#toolTip-prop. It will not have the "bubble" in your picture, but have you started from there?

        C Offline
        C Offline
        chris_rookie
        wrote on last edited by
        #3

        @JonB If there has a label didn't have enough width to hold all words, how can I show the complete words.

        JonBJ 1 Reply Last reply
        0
        • C chris_rookie

          @JonB If there has a label didn't have enough width to hold all words, how can I show the complete words.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @chris_rookie
          One possibility might be to follow the pattern in https://stackoverflow.com/questions/17221621/how-to-set-qt-tooltip-width. A more complex discussion is in https://stackoverflow.com/questions/4795757/is-there-a-better-way-to-wordwrap-text-in-qtooltip-than-just-using-regexp.

          1 Reply Last reply
          1

          • Login

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