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. WhatThis&ToolTip not working(QTableWidget)

WhatThis&ToolTip not working(QTableWidget)

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 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.
  • EngelardE Offline
    EngelardE Offline
    Engelard
    wrote on last edited by Engelard
    #1

    Hi everyone.
    I can't find proper SIGNAL in QTableWidget for mouse hovering. Here they all:

    I need something like:

    cellHovered(int row, int column);
    

    P.S. need same for horizontalHeaderItem
    P.P.S. i found that i need something like WhatThis function, because only text appearance needed. But i setWhatThis to my QTabelWidgetItem's, and nothing happened when i hovering on that items....

    UPDATE:

    Need to use setWhatThis or setToolTip, but none of them working, i don't know why..

    jsulmJ 1 Reply Last reply
    0
    • EngelardE Engelard

      Hi everyone.
      I can't find proper SIGNAL in QTableWidget for mouse hovering. Here they all:

      I need something like:

      cellHovered(int row, int column);
      

      P.S. need same for horizontalHeaderItem
      P.P.S. i found that i need something like WhatThis function, because only text appearance needed. But i setWhatThis to my QTabelWidgetItem's, and nothing happened when i hovering on that items....

      UPDATE:

      Need to use setWhatThis or setToolTip, but none of them working, i don't know why..

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Engelard You can use http://doc.qt.io/qt-5/qwidget.html#enterEvent

      https://forum.qt.io/topic/113070/qt-code-of-conduct

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

        Side note, you might also need to enable http://doc.qt.io/qt-5/qwidget.html#mouseTracking-prop

        "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
        2
        • EngelardE Offline
          EngelardE Offline
          Engelard
          wrote on last edited by
          #4

          Goal of topic changed. I need to use whatThis(); or toolTip(); but none of them working...

          I set both that functions, even included

          #include <QWhatsThis>
          #include <QToolTip>
          
          tempItem->setWhatsThis("this");
          tempItem->setToolTip("tool");
          

          But not working. I hovering on my items, no text appears.

          1 Reply Last reply
          0
          • VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #5

            It should work. Are you calling setItemWidget() on any of those items?

            "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

            EngelardE 1 Reply Last reply
            1
            • VRoninV VRonin

              It should work. Are you calling setItemWidget() on any of those items?

              EngelardE Offline
              EngelardE Offline
              Engelard
              wrote on last edited by Engelard
              #6

              @VRonin said in Signal for hovering cursor on cell(QTableWidget):

              It should work. Are you calling setItemWidget() on any of those items?

              No i do not. There is no such function for QTableWidget or QTableWidgetItem

              UPDATE:

              Now it's starts to work, i don't know what i've changed...

              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