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 it possible to set tooltip to a specific table item

Is it possible to set tooltip to a specific table item

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 1.4k 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.
  • P Offline
    P Offline
    Pou Lin Chang
    wrote on last edited by
    #1

    i have a table with 4 cells. i want to set a tooltip to the bottom right corner

    is it possible to set a tooltip to a specific table item ?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Are you using TableView or TableWdiget for the display ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      4
      • VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        table->model()->setData(table->model()->index(1,1),tr("I'm a tooltip"),Qt::ToolTipRole);

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply
        5
        • P Offline
          P Offline
          Pou Lin Chang
          wrote on last edited by
          #4

          I am using customized class.
          I already got the solution. I have a method that takes tooltip, i was unaware of it.

          thank you @dheerendra @VRonin

          1 Reply Last reply
          1
          • Pradeep KumarP Offline
            Pradeep KumarP Offline
            Pradeep Kumar
            wrote on last edited by
            #5

            @Pou-Lin-Chang
            can u share the solution, alternative ones, which would be useful.

            Thanks,

            Pradeep Kumar
            Qt,QML Developer

            P 1 Reply Last reply
            0
            • Pradeep KumarP Pradeep Kumar

              @Pou-Lin-Chang
              can u share the solution, alternative ones, which would be useful.

              Thanks,

              P Offline
              P Offline
              Pou Lin Chang
              wrote on last edited by Pou Lin Chang
              #6

              @Pradeep-Kumar
              Actually im using a custom class in which i have added a method that accepts a tooltip and a text string. Through this method i was able to achieve my desired output.

              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