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. QToolTip
Forum Updated to NodeBB v4.3 + New Features

QToolTip

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 5.4k 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.
  • R Offline
    R Offline
    RichardM198030
    wrote on last edited by
    #1

    HOw come the ToolTip isn't working?

    @
    actionNew->setToolTip(tr("Create a new File."));
    @

    That's what I tried, but there's no Tooltip, =(.

    I have
    @
    actionNew = new QAction(tr("&New;"), this);
    actionNew->setToolTip(tr("Create a new file."));
    @

    I also tried showToolTip, Qt has no function for showToolTip..

    Why is it always me that has issues with something this simple, I mean come on now, LOL.. =/.

    [EDIT: code formatting, please use @-tags, Volker]

    1 Reply Last reply
    0
    • C Offline
      C Offline
      chernetsov0
      wrote on last edited by
      #2

      Where do you put this action?
      It's not enough code to get the idea why tooltip is not popping.

      But maybe...
      [quote]
      Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute Qt::WA_AlwaysShowToolTips on the window, not on the widget with the tooltip.
      [/quote]

      Programmer is an organism that can turn caffeine into code.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        loladiro
        wrote on last edited by
        #3

        It's a known problem/feature. For a workaround see:
        http://developer.qt.nokia.com/forums/viewthread/6978

        1 Reply Last reply
        0
        • R Offline
          R Offline
          RichardM198030
          wrote on last edited by
          #4

          [quote author="chernetsov0" date="1312173033"]Where do you put this action?
          It's not enough code to get the idea why tooltip is not popping.

          But maybe...
          [quote]
          Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute Qt::WA_AlwaysShowToolTips on the window, not on the widget with the tooltip.
          [/quote]

          [/quote]

          Oh, thanks, =). So, Qt::WA_AlwaysShowToolTip; ?? Yeah, I am not sure, I think I need something before The Qt part, oh well, thanks for he help, =).

          1 Reply Last reply
          0
          • R Offline
            R Offline
            RichardM198030
            wrote on last edited by
            #5

            [quote author="chernetsov0" date="1312173033"]Where do you put this action?
            It's not enough code to get the idea why tooltip is not popping.

            But maybe...
            [quote]
            Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute Qt::WA_AlwaysShowToolTips on the window, not on the widget with the tooltip.
            [/quote]

            [/quote]

            Sorry, tried setAttribute(Qt::WA_AlwaysShowToolTips); didn't work, and as for window, what do you mean? I normally just have to use set, with no window name, if anything, it'd be AdvancedTextEditor..

            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