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. Alt attribute in html tags for QtableWidget
Qt 6.11 is out! See what's new in the release blog

Alt attribute in html tags for QtableWidget

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.0k 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.
  • M Offline
    M Offline
    m_pahlevanzadeh
    wrote on last edited by
    #1

    Dear all,

    I have a QtableWidget and i filled up from my row and columns,
    Now, i want to appear content of a cell, when i keep my mouse on the given cell, such as alt attribue in html tags.
    would you please guide me to write the ralated connect function ?

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      did you try QTableWidgetItem::setData():
      @
      tableItem->setData ( Qt::ToolTipRole, QString("ToolTip") );
      @

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • M Offline
        M Offline
        m_pahlevanzadeh
        wrote on last edited by
        #3

        Thank you , i wrote the following code:
        @projectsFindInstance.tableWidget_2.item.setData(QtCore.Qt.ToolTipRole, "ToolTip")@

        But i don't know how to connect which signal.

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          with which signal?!
          QTableWidget should display the tool tip automatically IIRC

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • M Offline
            M Offline
            m_pahlevanzadeh
            wrote on last edited by
            #5

            thank you, you solved my problem.

            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